You can use
removeAll() {
Promise.all([
this.storage.remove(key1),
this.storage.remove(key2),
this.storage.remove(key3),
]).then(value => doSomething());
See also https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Promise/all
More Related Contents:
- using external JS libraries in my angular 2 project
- Is it a good practice using Observable with async/await?
- Safe value must use [property]=binding after bypass security with DomSanitizer
- Angular2 calling custom function after ngSwitch new view is created
- How to turn this callback into a promise using async/await?
- Promise – is it possible to force cancel a promise
- Dynamic template URLs in Angular 2
- Angular Cli Webpack, How to add or bundle external js files?
- Adding script tags in Angular component template
- Deep copy an array in Angular 2 + TypeScript
- Using promise function inside Javascript Array map
- Angular 2 – communication of typescript functions with external js libraries
- How do I wait for a promise to finish before returning the variable of a function?
- How to expose angular 2 methods publicly?
- Use external javaScript library in angular application
- How to set Angular 4 background image?
- How to check for isBrowser in Angular 4
- Change route params without reloading in Angular 2
- How to promisify Node’s child_process.exec and child_process.execFile functions with Bluebird?
- What is the difference between BehaviorSubject and Observable?
- ChangeDetectionStrategy.OnPush and Observable.subscribe in Angular 2
- Angular 2 binding/events not working when adding template as innerHTML
- When does async function actually return a pending promise?
- Subscribe to observable is returning undefined
- Async Await map not awaiting async function to complete inside map function before mapping next item
- Angular 2 Hover event
- JavaScript asynchronous programming: promises vs generators
- How to use jQuery UI with Angular 2
- Is it a bad practice to use jQuery in Angular? [closed]
- Angular 4: How to read content of text file with HTTPClient