diff options
Diffstat (limited to 'client/src/app/+search/search-routing.module.ts')
-rw-r--r-- | client/src/app/+search/search-routing.module.ts | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/client/src/app/+search/search-routing.module.ts b/client/src/app/+search/search-routing.module.ts new file mode 100644 index 000000000..14a0d0a13 --- /dev/null +++ b/client/src/app/+search/search-routing.module.ts | |||
@@ -0,0 +1,41 @@ | |||
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 {} | ||