I need to get jwt token via http module then make other requests with this token in header. How I can make delay of app initialization till token get request resolved?
Asked
Active
Viewed 355 times
1 Answers
1
this.http.get(...)
.map(response => response.json())
.flatMap(response => this.http.get(...).map(response => response.json())
.subscribe(response => this.result = response);
You can use How to pass parameters rendered from backend to angular2 bootstrap method to delay app-initialization.
Community
- 1
- 1
Günter Zöchbauer
- 558,509
- 191
- 1,911
- 1,506