I have an observable that will subscribe as usual:
return oMassChangeOb
.subscribe(function (aMassDates) {
const oModel = self.getModel("vmCalSpecialDates");
oModel.setProperty("/aActualDates", aMassDates);
}, function (oErr) {
jQuery.sap.log.fatal(oErr);
});
My question is, how to run an other observable as soon as the above observable has been subscribed?
I could do it as follow:
return oMassChangeOb
.subscribe(function (aMassDates) {
const oModel = self.getModel("vmCalSpecialDates");
oModel.setProperty("/aActualDates", aMassDates);
oSaveCancelFooterStateOb
.subscribe(function (oBtnState) {
const oModel = self.getModel("vmButtonsState");
oModel.setProperty("/bSave", oBtnState.bSave);
oModel.setProperty("/bCancel", oBtnState.bCancel)
});
}, function (oErr) {
jQuery.sap.log.fatal(oErr);
});
But I do not know, if it is the right way to go.
There is a notification object that could be solve the scenario, but do not know how to use it.