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.
 
 
 
 
 
 

39 lines
1.3 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: 'page/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, relativeLinkResolution: 'legacy' },
),
LayoutModule,
],
exports: [RouterModule],
})
export class AppRoutingModule {}