getShowPopup(fileName,zoneId) {
return this.getDataFromServer(fileName,zoneId).then((response) => {
return response;
});
}
const showPopup = this.Service.getShowPopup(fileName,this.id);
showPopup is assigned with an undefined value. On debugging, the getShowPopup method is returning value before the promise is executed. How can I make this synchronous so that it waits for the response and then return the correct result.