#133

Описание к видео #133

The StatusChanges is an event raised by the Angular forms whenever the Angular calculates the validation status of the FormControl, FormGroup or FormArray. It returns an observable so that you can subscribe to it. The observable gets the latest status of the control. The Angular runs the validation check on every change made to the control. It also generates a list of validation errors in which case the status becomes INVALID. If there are no errors, then the status becomes VALID

In the same way, The ValueChanges is an event raised by the Angular forms whenever the value of the FormControl, FormGroup, or FormArray changes. It returns an observable so that you can subscribe to it. The observable get the latest value of the control. It allows us to track changes made to the value in real-time and respond to them. For example, we can use it to validate the value, calculate the computed fields, etc.

Let's understand valueChanges & statusChanges events with an example in this lecture.

YOU CAN DOWNLOAD THE STARTUP PROJECT FROM HERE: https://github.com/manojjha86/angular...

YOU CAN DOWNLOAD THE FINAL PROJECT FROM HERE: https://github.com/manojjha86/angular...

Комментарии

Информация по комментариям в разработке