* Subscribes to the platform's `popState` events. * * Note: `Location.go()` does not trigger the `popState` event in the browser. Use * `Location.onUrlChange()` to subscribe to URL changes instead. * * @param value Event that is triggered when the state history changes. * @param ex
(
onNext: (value: PopStateEvent) => void,
onThrow?: ((exception: any) => void) | null,
onReturn?: (() => void) | null,
)
| 260 | * @returns Subscribed events. |
| 261 | */ |
| 262 | subscribe( |
| 263 | onNext: (value: PopStateEvent) => void, |
| 264 | onThrow?: ((exception: any) => void) | null, |
| 265 | onReturn?: (() => void) | null, |
| 266 | ): SubscriptionLike { |
| 267 | return this._subject.subscribe({ |
| 268 | next: onNext, |
| 269 | error: onThrow ?? undefined, |
| 270 | complete: onReturn ?? undefined, |
| 271 | }); |
| 272 | } |
| 273 | |
| 274 | /** |
| 275 | * Normalizes URL parameters by prepending with `?` if needed. |
no test coverage detected