<html ng-app>
<body>
<p ng-cloak>{{foo}}</p>
</body>
</html>
My interpretation:
- The HTML page is displayed.
- Once the DOMContentLoaded event is triggered, Angular begins bootstrapping.
- During the compilation phase, the
ng-cloak
directive hides elements withdisplay: none !important
. - As part of the linking process, the
display: none !important
style is removed from elements withng-cloak
before re-rendering occurs.
I comprehended why elements are hidden from the start of the compile phase to the end of the link phase. However, I am curious about why they remain hidden from when the HTML loads till the compilation phase starts.