Person, I noticed that whenever I reload the page, while page is being loaded, it shows all the keys {{}} of the scopes of my project, is it normal? the page containing the scopes coming from a get json is in php ....
Person, I noticed that whenever I reload the page, while page is being loaded, it shows all the keys {{}} of the scopes of my project, is it normal? the page containing the scopes coming from a get json is in php ....
It is 'normal' for this to happen because the angular only renders the view after the DOM is fully loaded. While this does not happen, {{}} are just normal characters.
There is an angular directive to prevent this, ngCloak
, which simply helps to hide all content until the angle renders the DOM.
link
Just put this directive in a parent element of the page (it's important that it be next to or underneath the element that contains the ng-app directive), and after finishing loading, the angle removes references to it alone, everything appears normally.
Finally, to work correctly, in your main CSS, you need to add the following code:
[ng\:cloak], [ng-cloak], [data-ng-cloak], [x-ng-cloak], .ng-cloak, .x-ng-cloak {
display: none !important;
}
I hope I have helped! Abs!