(url: string|null|undefined)
| 37 | |
| 38 | // TODO: ignore if url-without-hash-or-search matches current location? |
| 39 | go(url: string|null|undefined) { |
| 40 | if (!url) { return; } |
| 41 | url = this.stripSlashes(url); |
| 42 | if (/^http/.test(url) || this.swUpdateActivated) { |
| 43 | // Has http protocol so leave the site |
| 44 | // (or do a "full page navigation" if a ServiceWorker update has been activated) |
| 45 | this.goExternal(url); |
| 46 | } else { |
| 47 | this.location.go(url); |
| 48 | this.urlSubject.next(url); |
| 49 | } |
| 50 | } |
| 51 | |
| 52 | goExternal(url: string) { |
| 53 | window.location.assign(url); |
no test coverage detected