最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - Angular2 lifecycle hook for fully loaded? - Stack Overflow

programmeradmin5浏览0评论

Is there any lifecycle hook, which tells you if all the content is loaded? I'm having a site, which has several asynchronously working ponents. So the ponents 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!

Is there any lifecycle hook, which tells you if all the content is loaded? I'm having a site, which has several asynchronously working ponents. So the ponents 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!

Share Improve this question edited Feb 22, 2017 at 17:05 Claies 22.3k4 gold badges55 silver badges80 bronze badges asked Feb 22, 2017 at 17:01 tschaka1904tschaka1904 1,4993 gold badges20 silver badges45 bronze badges
Add a ment  | 

1 Answer 1

Reset to default 8
ngAfterViewInit() 

of the AppComponent

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

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

发布评论

评论列表(0)

  1. 暂无评论