【发布时间】:2017-09-29 12:57:53
【问题描述】:
我做了什么:
我正在使用 Visual Studio,因此我通过添加以下内容编辑了 package.json 文件:
- cordova-plugin-geolocation(在 cordovaPlugins 数组内)
- @ionic-native/geolocation(内部依赖对象)
然后我去编辑 app.module.ts 文件,添加:
import { Geolocation } from '@ionic-native/geolocation';
此时,当我尝试运行浏览器仿真时,我会收到以下错误:
Failed to load resource: the server responded with a status of 404 (Not Found) : main.css
Failed to load resource: the server responded with a status of 404 (Not Found) : main.js
Failed to load resource: the server responded with a status of 404 (Not Found) : polyfills.js
另外,我尝试通过以下方式导入假包:
import { Geolocation } from '@ionic-native/dfsdfdsf';
而且我没有收到任何错误(当然,即使它什么也没做)。
【问题讨论】:
标签: cordova ionic-framework ionic2 geolocation