i'm trying to use ngrx's router-store
/module
@NgModule({
imports: [
....
StoreModule.forRoot(reducers)
StoreRouterConnectingModule.forRoot(),
...
],
....
})
/store
import { getSelectors, RouterReducerState } from '@ngrx/router-store'
const selectRouter = createFeatureSelector<RouterReducerState>('router');
const { selectQueryParam } = getSelectors(selectRouter);
export const selectedId = selectQueryParam('id'); //error after subscribing
but when I subscribe to any selectRouter selectors, like selectQueryParam, I get error
Cannot read property 'firstChild' of undefined
since my routerState object has no root property...
closest thing i could find on google was https://github.com/ngrx/platform/issues/2153
any idea how i can fix this and use my route selector?

I guess you are missing minimal state for
RouterState. This might help