Reputation: 11597
When my app loads, angular directives and bindings are visible for a slight moment before Angular consumes them. This is distracting and looks unprofessional, and I fear it may leave an unpleasant mark on my visitors.
What is the proper way to avoid this, besides the obvious solution of putting the Angular loading script into the head and blocking the render of the rest of the page?
Upvotes: 1
Views: 68
Reputation: 176
http://docs.angularjs.org/api/ng.directive:ngCloak
Try the ng-cloak directive. Docs state is just for this situation. I've used it without loading angular in the head as well.
Upvotes: 1
Reputation: 6309
You should use either ngBind or ngCloak.
See ngBind API / ngCloak API
Upvotes: 3
Reputation: 19037
Please use ngCloak directive
http://docs.angularjs.org/api/ng.directive:ngCloak
Upvotes: 1