mirror of https://github.com/abpframework/abp.git
3 changed files with 15 additions and 13 deletions
@ -1,20 +1,20 @@ |
|||
import { eLayoutType, RoutesService } from '@abp/ng.core'; |
|||
import { APP_INITIALIZER } from '@angular/core'; |
|||
import { inject, provideAppInitializer } from '@angular/core'; |
|||
|
|||
export const APP_ROUTE_PROVIDER = [ |
|||
{ provide: APP_INITIALIZER, useFactory: configureRoutes, deps: [RoutesService], multi: true }, |
|||
provideAppInitializer(() => { |
|||
configureRoutes(inject(RoutesService)); |
|||
}), |
|||
]; |
|||
|
|||
function configureRoutes(routesService: RoutesService) { |
|||
return () => { |
|||
routesService.add([ |
|||
{ |
|||
path: '/', |
|||
name: '::Menu:Home', |
|||
iconClass: 'fas fa-home', |
|||
order: 1, |
|||
layout: eLayoutType.application, |
|||
}, |
|||
]); |
|||
}; |
|||
routesService.add([ |
|||
{ |
|||
path: '/', |
|||
name: '::Menu:Home', |
|||
iconClass: 'fas fa-home', |
|||
order: 1, |
|||
layout: eLayoutType.application, |
|||
}, |
|||
]); |
|||
} |
|||
|
|||
Loading…
Reference in new issue