Advertisement
fabiobiondi

Angular Router Events

May 30th, 2017
399
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.23 KB | None | 0 0
  1. ngOnInit() {
  2. this.router.events
  3. .filter(event => event instanceof NavigationEnd)
  4. .map(() => this.activatedRoute)
  5. .subscribe((activeRoute) => {
  6. console.log('NavigationEnd:', activeRoute);
  7. });
  8. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement