Delete all local storage


hey guys
if i want to create a button that delete all local storage from all page in my app i use ionic 2 typescript :slight_smile:



According to the ionic2 API, the method you need is clear().

So your code might look like this:

import {Component} from '@angular/core';
import {Storage, LocalStorage} from 'ionic-angular';
  template: `<ion-content></ion-content>`
export class MyClass{
   this.local = new Storage(LocalStorage);
   this.local.set('didTutorial', 'true');

function resetLocalStorage(){



hi @Gatewayapp

You need to call the clear() method of your local storage.
e.g localStorage.clear();
OR you can use $localStorage.$reset();
it will delete all your data from localStorage.