Encountering issues with implementing SQLite plugin in my Angular 2/Ionic 2 project.
Following the Ionic 2 documentation for instantiating SQLite is not yielding expected results.
Received an error message from Sublime:
Supplied parameters do not match any signature of the call target.
This suggests that the constructor requires certain parameters. What are those parameters?
Refer to Ionic 2 SQLite plugin documentation for more information: http://ionicframework.com/docs/v2/native/sqlite/
import { SQLite } from 'ionic-native';
let db = new SQLite();
db.openDatabse({
name: 'data.db',
location: 'default' // the location field is required
}).then(() => {
db.executeSql('create table danceMoves(name VARCHAR(32))', {}).then(() => {
}, (err) => {
console.error('Unable to execute sql', err);
})
}, (err) => {
console.error('Unable to open database', err);
});
Error message also indicates that Property 'openDatabse' does not exist on type 'SQLite'