Currently, the router uses an ObservableWrapper to allow subscribing to URL updates. I want access to the private _subject property to access the observable directly. The use case is using a Redux store to manage application state that allows us to capture the current URL of the router after navigation. This combined with the Redux dev tools would allow the router to be used to navigate back to previous URLs and the states associated with the URL at that point in time. Sample code with the current workaround below.
const routerObservable = <Observable<string>>router['_subject'];
routerObservable
.filter(url => url !== this.currentUrl)
.subscribe((url: string) => {
if (url !== this.lastUrl) {
state.dispatch(route.navigate({ url }));
}
});