I can not use this native (side menu, ionic 2)
page1.ts
import { Component } from ‘@angular/core’;
import { NavController, NavParams } from ‘ionic-angular’;
import { SQLite } from ‘ionic-native’;
@Component({
selector: ‘page-page1’,
templateUrl: ‘page1.html’
})
export class Page1 {
public carrinho: Array;
constructor(public navCtrl: NavController) {
let db: SQLite = new SQLite();
db.openDatabase({
name: “mercado.db”,
location: “default”
}).then(() => {
var sql_Tables = ‘’;
sql_Tables +="select * from `tb_carrinho`";
db.executeSql(sql_Tables, {}).then((sucesso) => {
alert('Tabelas ok');
}, (error) => {
alert("Unable to execute messages sql: "+error);
});
}, (error) => {
alert("Unable to open database: "+error);
});
}