]>
Commit | Line | Data |
---|---|---|
1 | import { NgModule } from '@angular/core' | |
2 | import { RouterModule, Routes } from '@angular/router' | |
3 | import { MetaGuard } from '@ngx-meta/core' | |
4 | import { ChannelLazyLoadResolver } from './channel-lazy-load.resolver' | |
5 | import { SearchComponent } from './search.component' | |
6 | import { VideoLazyLoadResolver } from './video-lazy-load.resolver' | |
7 | ||
8 | const searchRoutes: Routes = [ | |
9 | { | |
10 | path: '', | |
11 | component: SearchComponent, | |
12 | canActivate: [ MetaGuard ], | |
13 | data: { | |
14 | meta: { | |
15 | title: 'Search' | |
16 | } | |
17 | } | |
18 | }, | |
19 | { | |
20 | path: 'lazy-load-video', | |
21 | component: SearchComponent, | |
22 | canActivate: [ MetaGuard ], | |
23 | resolve: { | |
24 | data: VideoLazyLoadResolver | |
25 | } | |
26 | }, | |
27 | { | |
28 | path: 'lazy-load-channel', | |
29 | component: SearchComponent, | |
30 | canActivate: [ MetaGuard ], | |
31 | resolve: { | |
32 | data: ChannelLazyLoadResolver | |
33 | } | |
34 | } | |
35 | ] | |
36 | ||
37 | @NgModule({ | |
38 | imports: [ RouterModule.forChild(searchRoutes) ], | |
39 | exports: [ RouterModule ] | |
40 | }) | |
41 | export class SearchRoutingModule {} |