1
我试图建立我的科尔多瓦/ AngularJS应用,这里是我的初始化:为什么cordova.file.applicationDirectory为空?
var app = {
initialize: function() {
this.bindEvents()
},
bindEvents: function() {
document.addEventListener("deviceready", this.onDeviceReady, false)
},
onDeviceReady: function() {
document.getElementsByTagName("base")[0].setAttribute("href", cordova.file.applicationDirectory + "www/");
angular.bootstrap(document, ["myApp"])
}
};
app.initialize()
然而,cordova.file.applicationDirectory
为空。为什么会这样?
这是'iOS'相同吗?另外,为什么'cordova.file.applicationDirectory'为空? – Shamoon 2014-12-03 16:40:50
我从来没有为IOS开发过。但它必须相同。最终,Cordova将HTML5代码构建(转换)为本机应用程序。祝你好运。 – efkan 2014-12-03 17:09:56