docs(docs-infra): change variable names in route guards examples (#44444)

change variable name 'next' to 'route' in route guards examples on developer guides "Routing and Navigation Tutorial: Adding routing to Tour of Heroes" to make it consistent with api docs and subsequent examples.

Fixes #44291

PR Close #44444
This commit is contained in:
Yousaf Nawaz
2021-12-11 20:59:30 +05:00
committed by Alex Rickabaugh
parent 12f7c85fd0
commit ab2248e773
2 changed files with 2 additions and 2 deletions
@@ -7,7 +7,7 @@ import { CanActivate, ActivatedRouteSnapshot, RouterStateSnapshot } from '@angul
})
export class AuthGuard implements CanActivate {
canActivate(
next: ActivatedRouteSnapshot,
route: ActivatedRouteSnapshot,
state: RouterStateSnapshot): boolean {
console.log('AuthGuard#canActivate called');
return true;
@@ -11,7 +11,7 @@ export class AuthGuard implements CanActivate {
constructor(private authService: AuthService, private router: Router) {}
canActivate(
next: ActivatedRouteSnapshot,
route: ActivatedRouteSnapshot,
state: RouterStateSnapshot): true|UrlTree {
const url: string = state.url;