I basically followed this guide to implement an Observable data service.
In a store class (ItemsStore
), I have my BehaviorSubject
which hol
The items property should be Observable, but you set it as BehaviourSubject type. In your link there is:
@Injectable()
export class TodoStore {
private _todos: BehaviorSubject> = new BehaviorSubject(List([]));
public todos: Observable> = this._todos.asObservable();
constructor(private todoBackendService: TodoBackendService) {
this.loadInitialData();
}
...
}
so assuming you followed this tutorial you should do something like this:
private _items: BehaviorSubject> = new BehaviorSubject(List([]));
public items: Observable> = this._items.asObservable();