Tag Archives: ng-bind

Difference between expression, ng-bind and ng-model

ng-bind and {{}} are basically the same. However, before your application fully loads, sometimes {{}} are visible. ng-bind usually looks a little nicer before everything finishes loading. ng-bind If you have $scope.textFromComponent = “Superman” in your controller. <span ng-bind=”textFromComponent”></span> binds this value within this span element. {{ }} The same behaviour can be achieved using {{}}. These set of… Read More »

Difference between ng-model and ng-bind

ng-bind and ng-model both have the concept of transforming data before showing to the user. ng-bind has one-way data binding ($scope –> view). It has a shortcut {{ val }} which displays the scope value $scope.item inserted into html where item is a variable name. ng-model is intended to be put inside of form elements… Read More »