Reputation: 854
I have a the following properties
private messages$: BehaviorSubject<Array<MessageModel>>;
public readonly messages: Observable<Array<MessageModel>>;
I'm pushing new messages with this.messages$.next(...)
, but at some point I want to clear the pushed data. I read about the empty()
method, but when I try to use it with this.messages
It says that the Observable<Array<MessageModel>>
has no such method. I try import 'rxjs/add/operator/map'
, but it still doesn't work.
Upvotes: 1
Views: 974