aboutsummaryrefslogblamecommitdiffhomepage
path: root/client/src/app/search/search-routing.module.ts
blob: 9da900e9a7936a16767ee9201feb0be810a8f8e0 (plain) (tree)
1
2
3
4
5
6

                                                      
                                                              


                                                                      










                               















                                     







                                                   
import { NgModule } from '@angular/core'
import { RouterModule, Routes } from '@angular/router'
import { SearchComponent } from '@app/search/search.component'
import { MetaGuard } from '@ngx-meta/core'
import { VideoLazyLoadResolver } from './video-lazy-load.resolver'
import { ChannelLazyLoadResolver } from './channel-lazy-load.resolver'

const searchRoutes: Routes = [
  {
    path: 'search',
    component: SearchComponent,
    canActivate: [ MetaGuard ],
    data: {
      meta: {
        title: 'Search'
      }
    }
  },
  {
    path: 'search/lazy-load-video',
    component: SearchComponent,
    canActivate: [ MetaGuard ],
    resolve: {
      data: VideoLazyLoadResolver
    }
  },
  {
    path: 'search/lazy-load-channel',
    component: SearchComponent,
    canActivate: [ MetaGuard ],
    resolve: {
      data: ChannelLazyLoadResolver
    }
  }
]

@NgModule({
  imports: [ RouterModule.forChild(searchRoutes) ],
  exports: [ RouterModule ]
})
export class SearchRoutingModule {}