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