I want to create a new localstorage in my ionic app (IONIC 3), but I've looked many ways to do that. I currently have this:
database.ts (my provider)
import { HttpClient } from '@angular/common/http';
import { Injectable } from '@angular/core';
import { Storage } from '@ionic/storage';
@Injectable()
export class DatabaseProvider {
localData: Storage;
constructor(public http: HttpClient) {
this.localData = new Storage(localStorage);
}
}
but the IDE told me that it's a mistake in the line "this.localData = new Storage(localStorage);" maybe it requires a special import. I have installed the "@ionic/storage": "2.1.3".
Thanks for your help!