I have a provider that listens to changes to my firestore database and changes the status of a driver pickup request status. here is my pickuprequest function in my driver's provider
getDriverPickupRequest(id)
{
this.DriverCollection.doc<Driver>(id).valueChanges()
.subscribe(data => {
this.pickuprequest.changePickupStatus(data.pickupRequest);
}
Now i have a service that watches the change and emits it to my home page.
private pickupRequest = new BehaviorSubject<boolean>(false);
public pickupStatus = this.pickupRequest.asObservable();
changePickupStatus(value: boolean) {
this.pickupStatus.emit(value);
}
constructor(public http: HttpClient) {
//console.log('Hello PickuprequestProvider Provider');
}
Now i get an error that says 'this.pickupStatus.emit is not a function'. What is wrong with the code?