Call next function after previous one has been completed. (Angular)

function1(message){
return new Promise((resolve, reject) => {
console.log(message);
resolve('succsess');
});

this.function1(message).then(data=>{
this.response = data;
console.log(this.response);
});

Comments

Popular posts from this blog

how to save images with angular nodejs

How to restrict your logged In page in angular (authentication guard)

How to notify about data update to other component.