-
Notifications
You must be signed in to change notification settings - Fork 0
/
app-routing.module.ts
57 lines (53 loc) · 1.43 KB
/
app-routing.module.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
// Angular
import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
// Guards
import { AuthGuard } from '@app/auth/auth.guard';
// Components
import { HomeComponent } from './components/routes/home/home.component';
import { ConnectComponent } from './components/routes/connect/connect.component';
import { PlaylistsComponent } from './components/routes/playlists/playlists.component';
import { DevicesComponent } from './components/routes/devices/devices.component';
import { NowPlayingComponent } from './components/routes/now-playing/now-playing.component';
import { ErrorComponent } from './components/routes/error/error.component';
const routes: Routes = [
{
path: '',
component: HomeComponent,
pathMatch: 'full',
},
{
path: 'connect',
component: ConnectComponent,
pathMatch: 'full',
},
{
path: 'playlists',
component: PlaylistsComponent,
pathMatch: 'full',
canActivate: [AuthGuard],
},
{
path: 'devices',
component: DevicesComponent,
pathMatch: 'full',
canActivate: [AuthGuard],
},
{
path: 'now-playing',
component: NowPlayingComponent,
pathMatch: 'full',
canActivate: [AuthGuard],
},
{
path: 'error',
component: ErrorComponent,
pathMatch: 'full',
canActivate: [AuthGuard],
},
];
@NgModule({
imports: [RouterModule.forRoot(routes)],
exports: [RouterModule],
})
export class AppRoutingModule {}