When i want to make something start as hidden with ng-show
you can just add class="ng-hide"
so the css will hide the element beforehand. This way an element won't be shown when the page is still loading
I want to do the same thing using ng-if
but i don't know how to do it
As Michiel suggested, using the ngCloak
directive is the solution.
Just add ng-cloak
to the class
attribute of the tag you want to keep hidden while your application is loading.
<div class="ng-cloak">test</div>
For more details: https://docs.angularjs.org/api/ng/directive/ngCloak
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With