ERROR in : Can't resolve all parameters for AuthorizationGuard
./authorization.guard.ts: (?, [object Object]). Not sure how to fix this.
import {ActivatedRouteSnapshot, CanActivate, Router, RouterStateSnapshot,
CanActivateChild,RouterModule } from "@angular/router";
import {Observable} from "rxjs";
import * as _ from 'lodash';
import {Injectable} from "@angular/core";
@Injectable()
export class AuthorizationGuardSecureityimplements CanActivateChild {
canActivateChild(childRoute: ActivatedRouteSnapshot, state:
RouterStateSnapshot): boolean | Observable<boolean> | Promise<boolean> {
throw new Error("Method not implemented.");
}
constructor(private allowedRoles:string[],
private router:Router) {
}
canActivate(route: ActivatedRouteSnapshot, state: RouterStateSnapshot) {
this.router.navigate(['Home/index']);
}
}
--
You received this message because you are subscribed to the Google Groups
"Angular and AngularJS discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.