Inputs using Angular 2’s ngModel
automatically apply style classes of .ng-valid
and .ng-invalid
each time the input’s validity changes. These classes allow you easily add your own styles simply by declaring the styles
in your Component
decorator.