Reputation: 12025
There is subject type:
public registerFilter: Subject<any> = new Subject();
I can use it like:
this.registerFilter.next("calendarplan");
How to modify Subject type to pass additional data like this:
this.registerFilter.next("calendarplan", {id: 1, name: "O"});
Upvotes: 0
Views: 2435
Reputation: 8558
Subject
is a special type of Observable
. It does not accept multiple values in next
method.
You need to redesign your way of sending parameters. Like following:
this.registerFilter.next({type: "calendarplan", filter_params: {id: 1, name: "O"}});
For furher reading: https://rxjs-dev.firebaseapp.com/guide/subject
Upvotes: 4