1
|
|
2
|
import {NgModule} from "@angular/core";
|
3
|
import {RouterModule, Routes} from "@angular/router";
|
4
|
import {LandingComponent} from "./pages/landing/landing.component";
|
5
|
import {DashboardComponent} from "./pages/dashboard/dashboard.component";
|
6
|
import {AuthGuardService} from "./services/auth-guard.service";
|
7
|
|
8
|
const appRoutes: Routes = [
|
9
|
{
|
10
|
path: '',
|
11
|
redirectTo: '/landing',
|
12
|
pathMatch: 'full'
|
13
|
},
|
14
|
{
|
15
|
path: 'landing',
|
16
|
component: LandingComponent
|
17
|
},
|
18
|
{
|
19
|
path: 'dashboard',
|
20
|
component: DashboardComponent,
|
21
|
canActivate: [AuthGuardService]
|
22
|
}
|
23
|
];
|
24
|
|
25
|
//export const appRoutingProviders: any[] = [];
|
26
|
|
27
|
//export const routing: ModuleWithProviders = RouterModule.forRoot(appRoutes);
|
28
|
|
29
|
|
30
|
@NgModule ({
|
31
|
imports: [RouterModule.forRoot(appRoutes)],
|
32
|
exports: [RouterModule]
|
33
|
})
|
34
|
|
35
|
export class AppRouting {}
|
36
|
|