UrlHandlingStrategy
class
Provides a way to migrate AngularJS applications to Angular.
abstract class UrlHandlingStrategy {
abstract shouldProcessUrl(url: UrlTree): boolean
abstract extract(url: UrlTree): UrlTree
abstract merge(newUrlPart: UrlTree, rawUrl: UrlTree): UrlTree
} Methods
| shouldProcessUrl() | ||
|---|---|---|
| Tells the router if this URL should be processed. | ||
|
| url | Type: |
Returns
boolean
When it returns true, the router will execute the regular navigation. When it returns false, the router will set the router state to an empty state. As a result, all the active components will be destroyed.
| extract() | ||
|---|---|---|
| Extracts the part of the URL that should be handled by the router. The rest of the URL will remain untouched. | ||
|
| url | Type: |
Returns
| merge() | ||||
|---|---|---|---|---|
| Merges the URL fragment with the rest of the URL. | ||||
|
| newUrlPart | Type: |
| rawUrl | Type: |
Returns
© 2010–2019 Google, Inc.
Licensed under the Creative Commons Attribution License 4.0.
https://v6.angular.io/api/router/UrlHandlingStrategy