nolanlawson / cordova-plugin-sqlite-2

Native SQLite database API for Cordova/PhoneGap/Ionic, modeled after WebSQL (UNMAINTAINED)
https://nolanlawson.com/2016/04/10/introducing-the-cordova-sqlite-plugin-2/
Apache License 2.0
168 stars 28 forks source link

What import statement should be used for using this plugin in Ionic ? #78

Closed pratiksan45 closed 3 years ago

pratiksan45 commented 3 years ago

Hi, I have installed this plugin in my Ionic framework using the command "npm i cordova-plugin-sqlite-2" but to use it's features for creating database, what should be my import statement i.e "import { } from '@ionic-/___';

nolanlawson commented 3 years ago

I'm not familiar with how Ionic works, but I believe Cordova plugins are just added to the window object. So it should be just window.sqlitePlugin. Let me know if that helps! If not, you might try StackOverflow.

faugusztin commented 3 years ago

Plugin being a drop-in replacement of cordova-sqlite-storage, you need to look at sqlite docs at Ionic native https://ionicframework.com/docs/native/sqlite .