IBM Interview Question

Difference between watch and observe in AngularJS, how do controllers communicate, what is filter, what design pattern(MV*) was used? ngbind and ngmodel difference?

Interview Answer

Anonymous

Oct 5, 2017

ng-bind has one-way data binding ($scope --> view). It has a shortcut {{ val }} which displays the scope value $scope.val inserted into html where val is a variable name. ng-model is intended to be put inside of form elements and has two-way data binding ($scope --> view and view --> $scope) e.g. .