0

I am using the sqlite plugin in my Ionic App https://ionicframework.com/docs/native/sqlite/

    databaseName = 'offline.db';
    destoryDatabase(){
    this.sqlite.deleteDatabase({ name: this.databaseName, location: 'default'});
  }

I tried this code it throwing an error. destroyDatabase does not exist. But the function does exists maybe the code might be wrong. Please Help.enter image description here

Michael Joshua
  • 47
  • 3
  • 11

1 Answers1

0

Check your code carefully, because: In the code it says: "destoryDatabase(){" . It may be because you didn't close the "}" and also the name is wrong.

But you wrote that the function "destroyDatabase" exists. As you can see, they're not the same at least in typo.

Check that and please add more code.

Koken
  • 102
  • 6