You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

41 lines
1.2 KiB

import { NgModule } from '@angular/core';
import { RouterModule } from '@angular/router';
import {LayoutModule} from "./layout/layout.module";
import {ErrorComponent} from "./page/error";
@NgModule({
imports: [
RouterModule.forRoot(
[
{ path: '', redirectTo: 'app/dashboard', pathMatch: 'full' },
{ path: 'page', loadChildren: () => import('./page/page.module').then(m => m.PageModule) },
/*{ path: 'app', component: LayoutComponent, children:
[
//{ path: 'dashboard', component: DashboardComponent, pathMatch: 'full', canActivate: [AuthGuard]},
{ path: 'dashboard2', component: Dashboard2Component, pathMatch: 'full'},
{ path: '**', redirectTo: '/pages/404'},
]
},*/
/*{ path: 'user', component: LayoutComponent, children:
[
{ path: 'login', component: LoginComponent, pathMatch: 'full'},
{ path: 'edit', component: EditComponent, pathMatch: 'full', canActivate: [AuthGuard]},
]
},*/
{ path: '**', redirectTo: '/page/404'},
],
{ useHash: true },
),
LayoutModule,
],
exports: [RouterModule],
})
export class AppRoutingModule {}