Parses a string into a `UrlTree`
(url: string)
| 600 | |
| 601 | /** Parses a string into a `UrlTree` */ |
| 602 | parseUrl(url: string): UrlTree { |
| 603 | try { |
| 604 | return this.urlSerializer.parse(url); |
| 605 | } catch (e) { |
| 606 | this.console.warn( |
| 607 | formatRuntimeError( |
| 608 | RuntimeErrorCode.ERROR_PARSING_URL, |
| 609 | ngDevMode && `Error parsing URL ${url}. Falling back to '/' instead. \n` + e, |
| 610 | ), |
| 611 | ); |
| 612 | return this.urlSerializer.parse('/'); |
| 613 | } |
| 614 | } |
| 615 | |
| 616 | /** |
| 617 | * Returns whether the url is activated. |