Angular router config handling

agnusdei·2023년 7월 5일
0
import { Route, Router, RouterModule } from '@angular/router';

menus: Route[] | undefined;

constructor(private readonly router: Router) {
    this.menus = router.config[0].children?.filter(
      (route) => route.data?.['menu']
    );
  }

0개의 댓글