Angular.js 1.3 One-time binding in ng-bind
Yes. This works: <span ng-bind=”::name”></span>
Yes. This works: <span ng-bind=”::name”></span>
Instead of interpolating(using {{}}) something in the ng-bind directive you can simply enclose the filtered value with a parenthesis and append your text. <h1 ng-bind=”(input | filter) + ‘ more stuff'”></h1> furthermore, if the text you want to add is not in any way dynamic then I suggest you append another element to bind the … Read more
Visibility: While your angularjs is bootstrapping, the user might see your placed brackets in the html. This can be handled with ng-cloak. But for me this is a workaround, that I don’t need to use, if I use ng-bind. Performance: The {{}} is much slower. This ng-bind is a directive and will place a watcher … Read more
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. <input ng-model=”val”/>.