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 a topic in the Google Groups "Angular and AngularJS discussion" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/angular/b5OtWpct31o/unsubscribe.
To unsubscribe from this group and all its topics, send an email to angular+u...@googlegroups.com.
To post to this group, send email to ang...@googlegroups.com.
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.
Anthony P
(919) 671-7234
--
You received this message because you are subscribed to a topic in the Google Groups "Angular and AngularJS discussion" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/angular/b5OtWpct31o/unsubscribe.
To unsubscribe from this group and all its topics, send an email to angular+u...@googlegroups.com.
To post to this group, send email to ang...@googlegroups.com.
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.