Need help to invoke side-effect actions, while my item saving in Firebase.
vehicle.service.ts:
...
public addVehicle(vehicle: Vehicle, success, error) {
return this.vehicles$.push(vehicle).then(success).catch(error);
}
vehicle.effects.ts:
@Effect()
addVehicle$ = this.actions$
.ofType(VehicleActions.ADD_VEHICLE)
// NEED TO CALL: this._statusActions.dataLoading('adding new vehicle...'))
.switchMap(action =>
Observable.fromPromise(
this._vehicleService.addVehicle(action.payload,
suc => this._statusActions.dataAdded(action.payload.name),
err => this._statusActions.dataNotSaved(action.payload.name)
) // I WANT TO CALL, NOT RETURN ONE OF THEM
))