How do I prevent this? Everywhere I have ng-repeat, it shows everything that is inside the div and the scopes without data when page is loaded for like less than 1 second then disappears and waits to load data and shows div normally. I just need to stop the flicker upon page load, but i can't find out why this happen
Asked
Active
Viewed 62 times
-2
-
Welcome to StackOverflow. Please take the [tour](http://stackoverflow.com/tour) have a look around, and read through the [HELP center](http://stackoverflow.com/help), then read [How to Ask Question](http://stackoverflow.com/help/how-to-ask), [What types of questions should I avoid asking?](http://stackoverflow.com/help/dont-ask) and provide a [MCVE : Minimal, Complete, and Verifiable Example](http://stackoverflow.com/help/mcve). If people around can easily read and understand what you mean, or what the problem is, they'll be more likely willing to help :) – Dwhitz Jul 18 '17 at 20:42
-
Possible duplicate of [Content briefly rendering then disappearing using ng-if](https://stackoverflow.com/questions/41593033/content-briefly-rendering-then-disappearing-using-ng-if) – lealceldeiro Jul 18 '17 at 20:55
-
Are you using {{ }} in your templates? The flicker can occur because of this - exchange them for ng-bind instead and it fixes that. – rrd Jul 18 '17 at 21:01
-
yes it worked, just needed to add ng-cloak on the div, thanks – ruipascoal Jul 18 '17 at 21:02
1 Answers
0
All it had to be done was add ng-cloak on the parent div where is doing the ajax calls. Thanks everyone for helping

ruipascoal
- 47
- 2
- 12