* 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 onNext Callback invoked with the event that is triggered when the state hist
(
onNext: (value: PopStateEvent) => void,
onThrow?: ((exception: any) => void) | null,
onReturn?: (() => void) | null,
)
| 267 | * @returns Subscribed events. |
| 268 | */ |
| 269 | subscribe( |
| 270 | onNext: (value: PopStateEvent) => void, |
| 271 | onThrow?: ((exception: any) => void) | null, |
| 272 | onReturn?: (() => void) | null, |
| 273 | ): SubscriptionLike { |
| 274 | return this._subject.subscribe({ |
| 275 | next: onNext, |
| 276 | error: onThrow ?? undefined, |
| 277 | complete: onReturn ?? undefined, |
| 278 | }); |
| 279 | } |
| 280 | |
| 281 | /** |
| 282 | * Normalizes URL parameters by prepending with `?` if needed. |
no test coverage detected