Returning value from subscription typescript
How would i return success from Save() method. public SaveItem() { if(save()){ // The goal is to use save method like this // Close pop up; } public SaveAndNew() { if(save()){ // The goal is to use save method like this // Create new item; } private save() { let issuccess = false; this.myservice.AddParty(newUserObject) .subscribe(data => { if (data['status'].toString() === '1') { return issuccess = false; } else { return issuccess = true; } }, (er) => { return issuccess = false; }); } If i have save(): boolean it will throw error that Must return a value if return issuccess outside the