Angular2 - How to delay the initial load until the service is completed?

I have an angular2 RC6 application, and I need to postpone page loading until some functionality is executed.

I have a service that defines a URI for webApi. I need an application to wait until this URL is determined before it tries to load any data. If I hide the main application in app.component, with * ngIf, I get routing errors because the router output does not exist.

Before RC5 / 6, I manually downloaded the application after receiving the URI.

+4
source share

Source: https://habr.com/ru/post/1654396/


All Articles