Return to site
· AngularJS,Web Applications,Web Development,markForCheck,detectChanges
broken image

detectChanges():void

If there is a case where anything inside the model has changed but it has not reflected in the view in this case you need to notify Angular to detect the changes and to update the view.

The cases for not detecting could be:

The Angular change detector is detached from the view or a change has happened but it hasn't been inside the Angular Zone so it doesn't know about it.

Let's see an example:

A third party function has updated your model and you want to update the changes in view.

model.text="newtext";