Don Chambers
Don Chambers

Reputation: 4261

Angular2 - How do I delay initial load until service completes?

I have an angular2 RC6 application and I need to defer loading pages until after some functionality is executed.

I have a service that determines the URI for the webApi. I need the 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 an *ngIf, I get routing errors because the router outlet does not exists.

Before RC5/6 I manually bootstrapped the application after the service get's the URI.

Upvotes: 5

Views: 11153

Answers (1)

Related Questions