Saturday 16 April 2016

Hide first default load div (Avoiding expressions) shown on page load in angularjs

As the others mentioned, use ng-cloak but also add the following to your CSS if it is the first to load in your page.

[ng\:cloak],[ng-cloak],.ng-cloak{display:none !important}
This will ensure that your div template is hidden. Below that div template, add something like

Loading...
The assignment of the $root.initializing.status with cause a true value for ng-hide.

<tr class="ng-cloak" dir-paginate="product in products">
             .........
             .........
             .........
</tr>

No comments:

Post a Comment