MCPcopy
hub / github.com/angular/angular / canActivate

Method canActivate

packages/router/test/create_url_tree.spec.ts:715–717  ·  view source on GitHub ↗
(snapshot: ActivatedRouteSnapshot)

Source from the content-addressed store, hash-verified

713 class Guard {
714 constructor(private readonly router: Router) {}
715 canActivate(snapshot: ActivatedRouteSnapshot) {
716 this.router.navigateByUrl(createUrlTreeFromSnapshot(snapshot, ['../sibling'], null, null));
717 }
718 }
719
720 @Component({

Callers

nothing calls this directly

Calls 2

navigateByUrlMethod · 0.45

Tested by

no test coverage detected