According to the study of Angular 1.3: one-time bindings ;
Using the new syntax is as simple as running an expression with ::. Therefore, if we apply the one-time expression to our example above, we will change this:
<p>Hello {{name}}!</p>
For this
<p>Hello {{::name}}!</p>
and now this is one way to bind.
But how can we create a binding once when using Angular directives such as ng-class? I tried the following, but that did not work:
ng-model="::name" ng-class="['label',{'label-danger': 'High' == ::tsk.Priority}]:
source share