I am making an angular2 application. My biggest problem is the inability to delay loading a child component that is dependent on the main component until some promises are resolved.
I have app.component.ts, with a class called AppComponent, which I load into boot.ts as follows:
bootstrap(AppComponent, [ROUTER_PROVIDERS, HTTP_PROVIDERS]);
Now I want to name some very important HTTP services before switching to my default route, that is - '/'. One http service returns the data that will be used for SEO and metadata settings on different routes.
I know that the constructor of any class is created first, but I don't know if the constructor will wait for promises to be resolved.
source share