Vitalii Vitalii - 16 days ago 5
AngularJS Question

Angular. Text rendered by angular is blinking when page loads

I have simple test page

<head>
........
<script src="~/lib/jquery/dist/jquery.js"></script>
<script src="~/lib/bootstrap/dist/js/bootstrap.js"></script>
<script src="~/lib/angular/angular.js"></script>
</head>
<body>
.......
<label>Name:</label>
<input type="text" ng-model="name" placeholder="Enter name">
<h1>Welcome {{name}}!</h1>
</body>


When page loads first time I see {{name}} on page

enter image description here

After a half of a second it disappears

enter image description here

that makes quite annoying effect of blinking. What am I missing and how can I avoid it?

Answer

You can use ngCloak to prevent this behavior.