Converts an Angular-Router-compatible route config array into NavigationNode[] for use with UINavigationPage.
Only routes that include data: { navLabel: '…' } are emitted. Child routes are recursively processed, producing group nodes when a parent has navigable children.
data: { navLabel: '…' }
The route configuration (e.g. inject(Router).config).
inject(Router).config
Internal: accumulated path prefix for nested routes.
An array of navigation tree nodes.
// In your app component:private readonly router = inject(Router);readonly navItems = routesToNavigation(this.router.config); Copy
// In your app component:private readonly router = inject(Router);readonly navItems = routesToNavigation(this.router.config);
Converts an Angular-Router-compatible route config array into NavigationNode[] for use with UINavigationPage.
Only routes that include
data: { navLabel: '…' }are emitted. Child routes are recursively processed, producing group nodes when a parent has navigable children.