The ng-bind directive is used for updating the content of an element with the results of the provided expression. With other words has the same functionality as double curly markup i.e. {{item.kind}}
The benefit of ng-bind versus the double curly markup regards the better presentantion on screen This is because the page is being compiled, there is a time slot before the state of the expression is shown. If the directive is formed by double curly markup, that (double curly) will be visible for a while.
In the above example, I have defined the variable myTitle into controller on $scope object.
And into body section I have used the content of my variable calling the directive ng-bind
The next screenshots shows the results
Δεν υπάρχουν σχόλια:
Δημοσίευση σχολίου