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:
Andrew Scott
2022-11-09 09:53:32 -08:00
committed by Andrew Kushnir
parent 046ce43388
commit f5d0c80622
5 changed files with 1 additions and 17 deletions
@@ -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;
+1 -1
View File
@@ -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;
/**