From ab2248e7738df9831e4222cb613a557f415fe22a Mon Sep 17 00:00:00 2001 From: Yousaf Nawaz Date: Sat, 11 Dec 2021 20:59:30 +0500 Subject: [PATCH] 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 --- aio/content/examples/router/src/app/auth/auth.guard.1.ts | 2 +- aio/content/examples/router/src/app/auth/auth.guard.2.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/aio/content/examples/router/src/app/auth/auth.guard.1.ts b/aio/content/examples/router/src/app/auth/auth.guard.1.ts index 1caa4ef0e78..220111d2b7d 100644 --- a/aio/content/examples/router/src/app/auth/auth.guard.1.ts +++ b/aio/content/examples/router/src/app/auth/auth.guard.1.ts @@ -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; diff --git a/aio/content/examples/router/src/app/auth/auth.guard.2.ts b/aio/content/examples/router/src/app/auth/auth.guard.2.ts index 55ca9d49ed2..6d512926069 100644 --- a/aio/content/examples/router/src/app/auth/auth.guard.2.ts +++ b/aio/content/examples/router/src/app/auth/auth.guard.2.ts @@ -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;