问题
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:
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
来源:https://stackoverflow.com/questions/24470496/how-to-know-when-the-component-is-loaded