I have a root-level router-store as defined below.
export interface RouterStateUrl {
url: string;
queryParams: Params;
params: Params;
}
export interface State {
routerReducer: RouterReducerState<RouterStateUrl>;
// init: fromInit.InitState;
}
export const reducers: ActionReducerMap<State> = {
routerReducer: routerReducer,
// initReducer: fromInit.reducer
};
export const getRouterState = createFeatureSelector<
RouterReducerState<RouterStateUrl>
>("routerReducer");
I am trying to add an additional piece of state called init
that I would like to track along with the router state. How can I create a feature selector that can also access the init state? In other words, how can I create a feature selector that is not type-bound to the RouterReducerState?
Just like you did with your router: