question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Event to detect all components init is complete

See original GitHub issue

Is there a way to know when mdc components are completely loaded after mdc.autoInit() is called? I cannot find anything like this in the docs.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:8 (8 by maintainers)

github_iconTop GitHub Comments

2reactions
Garbeecommented, Jul 16, 2017

Nothing like this is currently provided as far as I recall. What we could do is have autoInit return a promise resolution when completed so you can asynchronously handle tasks when the upgrades are completed for all components.

0reactions
yeelan0319commented, Aug 8, 2017

@yshterev @Garbee I see. This make sense.

In this case, instead of using emit method on a component, let’s dispatch the event directly from autoInit. @yshterev Feel free to take a look at how component emit is defined from packages/mdc-base/component.js line 116 and 117, I think we can do something similar here in mdc-autoinit.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Lifecycle hooks - Angular
Respond to events in the lifecycle of a component or directive by implementing one ... Called immediately after ngOnChanges() on every change detection...
Read more >
When an Angular 2 component has fully loaded - Stack Overflow
ngAfterViewInit () is called after the view initialization is completed. The component is fully loaded and initialized at this state.
Read more >
Angular lifecycle hooks explained - LogRocket Blog
A guide to lifecycle hooks in Angular, including what they do, and how to use them to gain more control over your applications....
Read more >
Complete Guide: Angular lifecycle hooks - InDepth.Dev
In this article, we will take a deeper dive into each lifecycle hook and look at how they're used in Angular.
Read more >
Angular Lifecycle Hooks: ngOnChanges, ngOnInit, and more
This article presents the lifecycle hooks in order of their execution (if they all execute). Certain conditions merit a hook's activation. There ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found