Parses a string into a `UrlTree`
(url: string)
| 590 | |
| 591 | /** Parses a string into a `UrlTree` */ |
| 592 | parseUrl(url: string): UrlTree { |
| 593 | try { |
| 594 | return this.urlSerializer.parse(url); |
| 595 | } catch (e) { |
| 596 | this.console.warn( |
| 597 | formatRuntimeError( |
| 598 | RuntimeErrorCode.ERROR_PARSING_URL, |
| 599 | ngDevMode && `Error parsing URL ${url}. Falling back to '/' instead. \n` + e, |
| 600 | ), |
| 601 | ); |
| 602 | return this.urlSerializer.parse('/'); |
| 603 | } |
| 604 | } |
| 605 | |
| 606 | /** |
| 607 | * Returns whether the url is activated. |