将breezeJS添加到我的Ionic项目失败,在设备上安装白屏

时间:2015-07-21 13:35:04

标签: angularjs ionic-framework breeze

我有一个需要项目,我想使用breezeJS,我的离子项目工作正常,但是当我添加breezeJS作为依赖离子angular.module,在我的chrome carnary和模拟器上它工作正常,但当我安装它在我的设备上我得到一个白色的屏幕。

是否有任何遗漏,我需要社区帮助来解决这个问题。

HTML:

<script src="scripts/breeze.debug.js"></script>
<script src="scripts/breeze.angular.js"></script>
<script src="scripts/breeze.directives.js"></script>
<script src="scripts/breeze.saveErrorExtensions.js"></script>

使用Javascript:

var app = angular.module('app', [
'ionic',
'starter.controllers',
'starter.services',
'LocalStorageModule', // Angular Local Storage

//// Custom modules 
'common',           // common functions, logger, spinner

///This is where i get the error, but when i remove this part the project works fine
'breeze.angular',    // configures breeze for an angular app
'breeze.directives', // contains the breeze validation directive (zValidate)
])

// Handle routing errors and success events
app.run(['$rootScope', '$ionicPlatform', 'breeze',
function ($rootScope, $ionicPlatform, breeze) {
    $ionicPlatform.ready(function () {
        // Hide the accessory bar by default (remove this to show the accessory bar above the keyboard
        // for form inputs)
        if (window.cordova && window.cordova.plugins && window.cordova.plugins.Keyboard) {
            cordova.plugins.Keyboard.hideKeyboardAccessoryBar(true);
        }
        if (window.StatusBar) {
            // org.apache.cordova.statusbar required
            StatusBar.styleLightContent();
        }
    });
}]);

提前致谢。

1 个答案:

答案 0 :(得分:0)

经过如此多的测试和研究,我后来才开始工作,

问题在于breeze.debug:

<script src="scripts/breeze.debug.js"></script>

我删除了它,所以留下了

<script src="script/breeze.min.js"></script>
<script src="script/labs/breeze.angular.js"></script>

app.js文件将是

var app = angular.module('app', [
  'ionic', 
  'starter.controllers', 
  'starter.services',

  'breeze.angular'    // configures breeze for an angular app
])

解决问题。

感谢。