Put in order · Angular course · Module 4: Routing
Subscribing to router events
Order the lines of a router event subscription (top to bottom, as in the component):
Items to put in order
- if (event instanceof NavigationEnd) { this.isLoading = false; }
- if (event instanceof NavigationStart) { this.isLoading = true; }
- this.router.events.subscribe(event => {
- });
You can check the correct answer by solving this task in the CodeWorlds game.