45 lines
1.3 KiB
TypeScript
45 lines
1.3 KiB
TypeScript
import {RouterModule, Routes} from '@angular/router';
|
|
import {HomeComponent} from '../components/home.component/home.component';
|
|
import {MainComponent} from './main.component/main.component';
|
|
import {TutorialsListComponent} from '../components/tutorials-list/tutorials-list.component';
|
|
import {TutorialsComponent} from '../components/tutorials.component/tutorials.component';
|
|
import {AddTutorialComponent} from '../components/add-tutorial/add-tutorial.component';
|
|
import {RegisterComponent} from '../components/register/register.component';
|
|
import {ProfileComponent} from '../components/profile/profile.component';
|
|
|
|
const MAIN_ROUTES: Routes =[
|
|
{
|
|
path: '',
|
|
component: MainComponent,
|
|
children: [
|
|
{
|
|
path: 'admin',
|
|
loadChildren: () =>
|
|
import('../admin-module/admin.module').then((m) => m.AdminModule),
|
|
},
|
|
{
|
|
path: 'home',
|
|
component: HomeComponent
|
|
},
|
|
{
|
|
path: 'tutorials',
|
|
component: TutorialsComponent
|
|
},
|
|
{
|
|
path: 'add-tutorial',
|
|
component: AddTutorialComponent
|
|
},
|
|
{
|
|
path: 'register',
|
|
component : RegisterComponent
|
|
},
|
|
{
|
|
path: 'profile',
|
|
component : ProfileComponent
|
|
}
|
|
],
|
|
}
|
|
];
|
|
|
|
export const mainRouting = RouterModule.forChild(MAIN_ROUTES);
|