1 import { Injectable } from '@angular/core'
2 import { Router } from '@angular/router'
3 import { VideoChannel } from '@app/shared/shared-main'
4 import { SearchService } from '@app/shared/shared-search'
5 import { AbstractLazyLoadResolver } from './abstract-lazy-load.resolver'
8 export class ChannelLazyLoadResolver extends AbstractLazyLoadResolver<VideoChannel> {
11 protected router: Router,
12 private searchService: SearchService
17 protected finder (url: string) {
18 return this.searchService.searchVideoChannels({ search: url })
21 protected buildUrl (channel: VideoChannel) {
22 return '/video-channels/' + channel.nameWithHost