4 ms·
To reduce the need for ng-cloak, use ng-bind <p ng-bind="value"></p> instead of <p>{{value}}</p> It is preferable to use ngBind instead of {{ expression }}
by really_operator 10y ago
To reduce the need for ng-cloak, use ng-bind
<p ng-bind="value"></p>
instead of
<p>{{value}}</p>
It is preferable to use ngBind instead of {{ expression }} if a template is momentarily displayed by the browser in its raw state before Angular compiles it. Since ngBind is an element attribute, it makes the bindings invisible to the user while the page is loading.
- BinaryIdiot 10y agoInteresting, I forgot about ng-bind (honestly it's a pattern I never see on the web). That is, for sure, the superior pattern.