简体   繁体   中英

Angular2 lifecycle hook for fully loaded?

Is there any lifecycle hook, which tells you if all the content is loaded? I'm having a site, which has several asynchronously working components. So the components are not ready at the same time. To avoid a strange appearance of the site, I'd like to put a kind of loading banner in place. But obviously, I need to know when I can disable the banner again.

Thanks for any suggestions or idea!

ngAfterViewInit() 

of the AppComponent

See also https://angular.io/docs/ts/latest/api/core/index/AfterContentInit-class.html

This won't cover components added by the router or non-Angular libraries.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM