How to know when the component is loaded?

2019-06-02 19:03发布

When creating a AngularDart component, I can use ShadowRootAware and override onShadowRoot to be sure that the shadow dom is loaded and ready for manipulation, as described by the docs;

It is guaranteed that when [onShadowRoot] is invoked, that shadow DOM has been loaded and is ready.

However, if useShadowDom is set to false, what alternative do I have that guarantees that the component or its content is loaded and ready to be manipulated?

1条回答
再贱就再见
2楼-- · 2019-06-02 19:39

You can use the same approach. Even though it says onShadowRoot it's still fired when it should with shadow root disabled. We just tried this last week on v0.12

查看更多
登录 后发表回答