Angular - RxJS and Observables Fundamentals
What is wrong with this Promise usage in Angular?
const p = new Promise((resolve, reject) => {
setTimeout(() => resolve('done'), 1000);
});
p.then(result => console.log(result));
p.catch(error => console.error(error));
p.cancel();