Example:
<html ...>
<body myApp:remove-nojs class="nojs">
[...]
</body>
/**
* Removes 'nojs' class from element, so the whole
* page becomes visible once angular is operational.
*/
angular.directive('myApp:remove-nojs', function(expr, compiledElement) {
compiledElement.removeClass('nojs');
});
And here is example CSS entry:
/* feat: do not display application until angular is running */
body.nojs div.wrapper {
display: none;
}
/* feat: before angular is ready, display loading animation */
body.nojs div.initializing_panel {
display: block;
background: url(../images/loading.gif) center center no-repeat;
position:absolute;
top:0;
left:0;
width: 100%;
height: 100%;
}
As you can see, until AngularJS is ready, user can see nice "loading"
animation. Background is not affected by 'nojs' class.
Regards,
Witold Szczerba
> --
> You received this message because you are subscribed to the Google Groups "AngularJS" group.
> To post to this group, send email to ang...@googlegroups.com.
> To unsubscribe from this group, send email to angular+u...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/angular?hl=en.
>
Is there any way to have static content not show up until the {{dynamic content}} has loaded?
--
You received this message because you are subscribed to the Google Groups "AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email to angular+u...@googlegroups.com.
To post to this group, send email to ang...@googlegroups.com.
Visit this group at http://groups.google.com/group/angular?hl=en-US.
For more options, visit https://groups.google.com/groups/opt_out.
This should help: http://docs.angularjs.org/api/ng.directive:ngCloak