mirror of
https://github.com/angular/angular.git
synced 2026-09-14 13:54:52 +08:00
docs(router): small adjustments to router docs (#48009)
* Update extractedUrl documentation to point to the correct extract method * Remove authService.redirectUrl from tour of heroes (it's not used anywhere) PR Close #48009
This commit is contained in:
committed by
Andrew Kushnir
parent
046ce43388
commit
f5d0c80622
@@ -15,9 +15,6 @@ export const authGuard: CanMatchFn|CanActivateFn = () => {
|
||||
return true;
|
||||
}
|
||||
|
||||
const url = router.getCurrentNavigation()!.extractedUrl.toString();
|
||||
// Store the attempted URL for redirecting
|
||||
authService.redirectUrl = url;
|
||||
// Redirect to the login page
|
||||
return router.parseUrl('/login');
|
||||
};
|
||||
|
||||
@@ -15,9 +15,6 @@ export const authGuard: CanMatchFn|CanActivateFn|CanActivateChildFn = () => {
|
||||
return true;
|
||||
}
|
||||
|
||||
const url = router.getCurrentNavigation()!.extractedUrl.toString();
|
||||
// Store the attempted URL for redirecting
|
||||
authService.redirectUrl = url;
|
||||
// Redirect to the login page
|
||||
return router.parseUrl('/login');
|
||||
};
|
||||
|
||||
@@ -17,11 +17,6 @@ export const authGuard: CanMatchFn|CanActivateFn|CanActivateChildFn = () => {
|
||||
return true;
|
||||
}
|
||||
|
||||
const url = router.getCurrentNavigation()!.extractedUrl.toString();
|
||||
|
||||
// Store the attempted URL for redirecting
|
||||
authService.redirectUrl = url;
|
||||
|
||||
// Create a dummy session id
|
||||
const sessionId = 123456789;
|
||||
|
||||
|
||||
@@ -18,11 +18,6 @@ export const authGuard: CanMatchFn|CanActivateChildFn|CanActivateFn|CanLoadFn =
|
||||
return true;
|
||||
}
|
||||
|
||||
const url = router.getCurrentNavigation()!.extractedUrl.toString();
|
||||
|
||||
// Store the attempted URL for redirecting
|
||||
authService.redirectUrl = url;
|
||||
|
||||
// Create a dummy session id
|
||||
const sessionId = 123456789;
|
||||
|
||||
|
||||
@@ -218,7 +218,7 @@ export interface Navigation {
|
||||
*/
|
||||
initialUrl: UrlTree;
|
||||
/**
|
||||
* The initial target URL after being parsed with `UrlSerializer.extract()`.
|
||||
* The initial target URL after being parsed with `UrlHandlingStrategy.extract()`.
|
||||
*/
|
||||
extractedUrl: UrlTree;
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user