When reloading a page of my angularJS app, it will show "School:", very ugly. I do not want to show this incomplete information during the page loading.
<title>School: {{query}}</title>
How to hide it while the page is loading?
When reloading a page of my angularJS app, it will show "School:", very ugly. I do not want to show this incomplete information during the page loading.
<title>School: {{query}}</title>
How to hide it while the page is loading?
Wherever you want to achieve this behavior, just add ng-cloak to that html tag. This will prevent the UI from showing the content until the expression is evaluated.
<title ng-cloak>School: {{query}}</title>
Instead of using double curlies, a better solution would be to use the ngBind
or ngBindTemplate
directives, which are invisible to the user while the page is loading:
<title ng-bind-template="School: {{query}}">Querying</title>