blob: 7db7fe994e819dc98dc4421d429e362ff74ef066 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
import { Injectable } from '@angular/core'
import { ActivatedRouteSnapshot, CanActivate, RouterStateSnapshot } from '@angular/router'
import { RedirectService } from './redirect.service'
@Injectable()
export class TrendingGuard implements CanActivate {
constructor (private redirectService: RedirectService) {}
canActivate (route: ActivatedRouteSnapshot, state: RouterStateSnapshot) {
this.redirectService.redirectToTrending()
return false
}
}
|