I am trying to check the active child route in a parent component, but I am having difficulties with it.
I have tried to subscribe to the ActivatedRoute by doing something like this:
class ParentComponent {
constructor(private _route:ActivatedRoute) {}
ngOnInit() {
this._route.data.subscribe(value => console.log(value)});
}
}
I have read a lot of threads on Stack Overflow, but can't find a solution that checks and gets updated regarding the child routes of a parent component.
Any ideas?