How to call a function on every route change in angular2
you can call activate method from main router-outlet like this <router-outlet (activate)=”changeOfRoutes()”></router-outlet> which will call every time when route will change. Update – Another way to achieve the same is to subscribe to the router events even you can filter them out on the basis of navigation state may be start and end or so, …