On a component is it possible to bind in the style like bindonce? Please provide an example.
Asked
Active
Viewed 125 times
1 Answers
2
since angular have v1.3 it used following syntax for bindonce
<div ng-repeat="item in ctrl.results">
<div>{{ ::item.name }} - {{ ::item.description }}</div>
</div>
<div ng-if="::vm.user.loggedIn"></div>
for class
ng-class="::{ loggedIn: vm.user.loggedIn }"

dimson d
- 1,488
- 1
- 13
- 14
-
You are right, here's the doc: https://docs.angularjs.org/guide/expression, section "One time binding". – Amio.io Jul 11 '16 at 07:14