Ultimately, if the value is simply displayed in the template, you can always use the async pipe:
<h1>{{ (someReducer | async)?.title }}</h1>
Alternatively, you can set the initial state inside the gearbox itself:
function someReducer (state = {title: 'Home'}, action) { switch (action.type) { default: return state; } }
Finally, you can set the initial state when the store is initialized:
StoreModule.provideStore(reducers, initialState)
Hope this helps you in some way.
Tom
source share