【发布时间】:2015-01-16 13:53:58
【问题描述】:
我无法让科尔多瓦文件系统工作。我有一个具有以下依赖项的项目:
com.ionic.keyboard 1.0.3 "Keyboard"
org.apache.cordova.console 0.2.12 "Console"
org.apache.cordova.device 0.2.13 "Device"
org.apache.cordova.file 1.3.2 "File"
org.apache.cordova.file-transfer 0.4.8 "File Transfer"
在app.js 中,我定义了对控制器模块的依赖:
angular.module('starter', ['ionic', 'controllers']);
控制器代码基本上是这样的:
angular.module('controllers', [])
.controller('GalleryCtrl', function ($scope) {
function success() {...}
function error() {...}
window.requestFileSystem(LocalFileSystem.PERSISTENT, 0, success, error);
}
}
然后我得到的是:
LocalFileSystem is not defined
另外,requestFileSystem 未定义。这种行为的原因可能是什么?
我正在使用 cordova 4.1.2 和 ionic 1.3.1。
编辑:这是相应的 html 标记:
<body ng-app="starter" ng-controller="GalleryCtrl">
<ion-nav-view>
<ion-slide-box id="slideBox">
<ion-slide ng-repeat="..."> <!-- details omitted -->
</ion-slide>
</ion-slide-box>
</ion-nav-view>
</body>
【问题讨论】:
标签: cordova cordova-plugins html5-filesystem ionic