Is it possible to get parent route instructions in some child component?
I try to create some breadcrumbs component and I can get route instruction for current component and for his child, but I have no idea how to get parent route instruction (it`s very important, because when I insert some path in URL and move to them, breadcrumbs should get all route tree data for correct self-rendering, not only the current component).
I use this way to get current route instr. It`s normal or some better way exist?
constructor(private _router: Router) { }
ngOnInit() {
this._router.subscribe((value) => {
this._router.recognize(value).then(instruction => {
let component = instruction.component,
crumb = component.routeData.get('routeLabel');
this.crumbsGenerate(crumb);
});
}
Please, help me. Thanks.