I have a component that uses javascript library. For now, I'm just using system.js to load dependencies
public ngOnInit() { System.import('lib').then(() => this.createControl()); }
However, this delay in initializing the component causes a problem with another consuming component. In essence, the createControl
function works too late.
Is it possible to delay initialization of the entire component with angular until all dependencies are loaded?
Umair source share