I have tried to read the json value through Rxjs observable and Bind in the view as follows and not able to get the value and instead it shows the anonymous object.
app.component.html
Count: {{ count$| async }}
app.component.ts
@select() readonly count$: Observable<number>;
ReduxState Object
{
count: {
counter: 10
}
}
You should know that you selected anonymous object because it didn't match the name of the property.
The select decorator uses a parameter to get the value of property, but
If nothing is passed then the
@selectdecorator will attempt to use the name of the class property to find a matching value in the Redux store. Note that a utility is in place here where any $ characters will be ignored from the class property's name.
You can use state of the store
@select(state => state.count.counter) readonly count$: Observable<number>;