无法安装 ionic2 SQLite 插件



我在Window上工作,MINGW64 bash。我创建了一个 Ionic 2 项目并使用以下行添加 SQLite 插件:

$ ionic plugin add cordova-sqlite-storage

当我运行我的项目时,使用:$ 离子服务 --实验室

我的项目启动并显示在Firefox上,但是在我的控制台中,我有以下行:

Native: tried accessing the SQLite plugin but it's not installed.    main.js
Install the SQLite plugin: 'ionic plugin add cordova-sqlite-storage' main.js

但是我的项目中没有"main.js"文件,我只有一个main.ts文件,其中包含:

import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
import { AppModule } from './app.module';
platformBrowserDynamic().bootstrapModule(AppModule);

插件是否可以在网络浏览器的模拟设备上运行?

插件

不会像@suraj指出的那样加载到 ionic 服务器中。尝试在浏览器平台中运行它。

离子平台添加浏览器

离子运行浏览器

最新更新