in
rxjs5(angular6 app), I usethis.router.events .filter(event => event instanceof NavigationEnd) .map(() => this.activatedRoute) .map(route => { while (route.firstChild) { route = route.firstChild; } return route;`enter code here` }) .filter(route => route.outlet === 'primary') .mergeMap(route => route.data) .subscribe((event) => { this.titleService.setTitle(event['title'] + '-' + APP_NAME); this.appDataLogic.urlChanged(); });But in
rxjs6,routeis{}so that has errorproperty firstChild does not exist on type {}.this.router.events.pipe( filter(event => event instanceof NavigationEnd), map(() => { return this.activatedRoute }).pipe(), map(route => { while (route.firstChild) { route = route.firstChild; } return route; }), filter(route => route.outlet === 'primary'), mergeMap(route => route.data) ).subscribe((event) => { this.titleService.setTitle(event['title'] + '-'); })How do I rewrite it with rxjs6? thanks a lot.