parent
66636c6e9e
commit
1f942b0da1
@ -1,3 +1,41 @@
|
||||
import { Routes } from '@angular/router';
|
||||
import { AdminGuard } from './auth/admin.guard';
|
||||
import { NotFoundComponent } from './components/not-found/not-found.component';
|
||||
import { LoginPageComponent } from './components/login-page/login-page.component';
|
||||
import { DashboardComponent } from './components/dashboard/dashboard.component';
|
||||
import { ConfigComponent } from './components/config/config.component';
|
||||
import { UsersComponent } from './components/users/users.component';
|
||||
|
||||
export const routes: Routes = [];
|
||||
export const routes: Routes = [
|
||||
{
|
||||
path: '',
|
||||
redirectTo: 'dashboard',
|
||||
pathMatch: 'full'
|
||||
},
|
||||
{
|
||||
path: 'login',
|
||||
component: LoginPageComponent
|
||||
},
|
||||
{
|
||||
path: '',
|
||||
canActivate: [AdminGuard],
|
||||
children: [
|
||||
{
|
||||
path: 'dashboard',
|
||||
component: DashboardComponent
|
||||
},
|
||||
{
|
||||
path: 'config',
|
||||
component: ConfigComponent
|
||||
},
|
||||
{
|
||||
path: 'users',
|
||||
component: UsersComponent
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
path: '**',
|
||||
component: NotFoundComponent
|
||||
}
|
||||
];
|
||||
|
Loading…
Reference in new issue