1

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?

2 Answers2

2

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>

Nikhilesh K V
  • 1,480
  • 13
  • 20
1

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>
Hongbin Wang
  • 1,186
  • 2
  • 14
  • 34