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

                                                      
                                          
                                                                      

                                                                  


                              
             






                               

    
                            






                                 
                              




                                   







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

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

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