(locationStrategy: LocationStrategy)
| 65 | _urlChangeSubscription: SubscriptionLike | null = null; |
| 66 | |
| 67 | constructor(locationStrategy: LocationStrategy) { |
| 68 | this._locationStrategy = locationStrategy; |
| 69 | const baseHref = this._locationStrategy.getBaseHref(); |
| 70 | // Note: This class's interaction with base HREF does not fully follow the rules |
| 71 | // outlined in the spec https://www.freesoft.org/CIE/RFC/1808/18.htm. |
| 72 | // Instead of trying to fix individual bugs with more and more code, we should |
| 73 | // investigate using the URL constructor and providing the base as a second |
| 74 | // argument. |
| 75 | // https://developer.mozilla.org/en-US/docs/Web/API/URL/URL#parameters |
| 76 | this._basePath = _stripOrigin(stripTrailingSlash(_stripIndexHtml(baseHref))); |
| 77 | this._locationStrategy.onPopState((ev) => { |
| 78 | this._subject.next({ |
| 79 | 'url': this.path(true), |
| 80 | 'pop': true, |
| 81 | 'state': ev.state, |
| 82 | 'type': ev.type, |
| 83 | }); |
| 84 | }); |
| 85 | } |
| 86 | |
| 87 | /** @docs-private */ |
| 88 | ngOnDestroy(): void { |
nothing calls this directly
no test coverage detected