Is there a callback in Angular.js triggered after a ng-model binding is done?

222 views Asked by At

The question is clear I guess. I want to be informed after an ng-model binding is completed and the value is reflected to the DOM element.

I am aware that this can't be done for all ng-model bindings in a document.ready fashion but I would like to be informed at least for a particular element after DOM binding is done.

Why would I need it? To solve this problem with Bootstrap Material Design theme: https://github.com/FezVrasta/bootstrap-material-design/issues/194

Any idea please?

1

There are 1 answers

1
Rishul Matta On

you can use a $watch on the variable which is binded to ng-model

work around

$timeout is executed when all the DOM manipulation is done , this assures that changes of your model have been reflected in the DOM