我尝试使用ionic -image - lazy -load,但每个应用程序显示一个空白页面时都会出错。
这是我的代码:
<script src="lib/ionic/js/ionic.bundle.js"></script>
<script src="js/ng-cordova.min.js"></script>
<script src="cordova.js"></script>
<script type="text/javascript" src="js/SocialSharing.js"></script>
<script src="js/ionic-image-lazy-load.js"></script>
controller.js:
angular.module('starter.controllers', ['ionic', 'ngCordova', 'ionicLazyLoad'])
错误:
ncaught Error: [$injector:modulerr] Failed to instantiate module starter due to:
错误:[$ injector:modulerr]由于以下原因导致无法实例化模块starter.controllers: 错误:[$ injector:modulerr]由于以下原因,无法实例化模块ionicLazyLoad: 错误:[$ injector:nomod]模块'ionicLazyLoad'不可用!您要么错误拼写了模块名称,要么忘记加载它。如果注册模块,请确保将依赖项指定为第二个参数。 http://errors.angularjs.org/1.4.3/ $注射器/ NOMOD?P0 = ionicLazyLoad 在REGEX_STRING_REGEXP(http://10.0.0.42:8100/lib/ionic/js/ionic.bundle.js:8895:12) 在http://10.0.0.42:8100/lib/ionic/js/ionic.bundle.js:10785:17 在确保(http://10.0.0.42:8100/lib/ionic/js/ionic.bundle.js:10709:38) 在模块(http://10.0.0.42:8100/lib/ionic/js/ionic.bundle.js:10783:14) 在http://10.0.0.42:8100/lib/ionic/js/ionic.bundle.js:13189:22 at forEach(http://10.0.0.42:8100/lib/ionic/js/ionic.bundle.js:9163:20) 在loadModules(http://10.0.0.42:8100/lib/ionic/js/ionic.bundle.js:13173:5) 在http://10.0.0.42:8100/lib/ionic/js/ionic.bundle.js:13190:40 at forEach(http://10.0.0.42:8100/lib/ionic/js/ionic.bundle.js:9163:20) 在loadModules(http://10.0.0.42:8100/lib/ionic/js/ionic.bundle.js:13173:5) http://errors.angularjs.org/1.4.3/ $注射器/ modulerr P0 = ionicLazyLoad&安培; P1 =呃...%3A%2F%2F10.0.0.42%3A8100%2Flib%2Fionic%2Fjs%2Fionic.bundle.js%3A13173%3A5) 在REGEX_STRING_REGEXP(http://10.0.0.42:8100/lib/ionic/js/ionic.bundle.js:8895:12) 在http://10.0.0.42:8100/lib/ionic/js/ionic.bundle.js:13212:15 at forEach(http://10.0.0.42:8100/lib/ionic/js/ionic.bundle.js:9163:20) 在loadModules(http://10.0.0.42:8100/lib/ionic/js/ionic.bundle.js:13173:5) 在http://10.0.0.42:8100/lib/ionic/js/ionic.bundle.js:13190:40 at forEach(http://10.0.0.42:8100/lib/ionic/js/ionic.bundle.js:9163:20) 在loadModules(http://10.0.0.42:8100/lib/ionic/js/ionic.bundle.js:13173:5) 在http://10.0.0.42:8100/lib/ionic/js/ionic.bundle.js:13190:40 at forEach(http://10.0.0.42:8100/lib/ionic/js/ionic.bundle.js:9163:20) 在loadModules(http://10.0.0.42:8100/lib/ionic/js/ionic.bundle.js:13173:5) http://errors.angularjs.org/1.4.3/ $注射器/ modulerr?P0 = starter.controllers ...%3A%2F%2F10.0.0.42%3A8100%2Flib%2Fionic%2Fjs%2Fionic.bundle.js%3A13173%3A5) 在REGEX_STRING_REGEXP(http://10.0.0.42:8100/lib/ionic/js/ionic.bundle.js:8895:12) 在http://10.0.0.42:8100/lib/ionic/js/ionic.bundle.js:13212:15 at forEach(http://10.0.0.42:8100/lib/ionic/js/ionic.bundle.js:9163:20) 在loadModules(http://10.0.0.42:8100/lib/ionic/js/ionic.bundle.js:13173:5) 在http://10.0.0.42:8100/lib/ionic/js/ionic.bundle.js:13190:40 at forEach(http://10.0.0.42:8100/lib/ionic/js/ionic.bundle.js:9163:20) 在loadModules(http://10.0.0.42:8100/lib/ionic/js/ionic.bundle.js:13173:5) 在createInjector(http://10.0.0.42:8100/lib/ionic/js/ionic.bundle.js:13099:11) at doBootstrap(http://10.0.0.42:8100/lib/ionic/js/ionic.bundle.js:10457:20) 在bootstrap(http://10.0.0.42:8100/lib/ionic/js/ionic.bundle.js:10478:12) http://errors.angularjs.org/1.4.3/ $ injector / modulerr?p0 = starter&amp; p1 =错误%3A ... 3A%2F%2F10.0.0.42%3A8100%2Flib%2Fionic%2Fjs%2Fionic.bundle.js%3A10478%3A12)REGEX_STRING_REGEXP @ ionic.bundle.js:8895(匿名函数)@ ionic.bundle.js:13212forEach @ ionic.bundle.js:9163loadModules @ ionic.bundle.js:13173createInjector @ ionic.bundle.js:13099doBootstrap @ ionic.bundle.js: 10457bootstrap @ ionic.bundle.js:10478angularInit @ ionic.bundle.js:10372(匿名函数)@ ionic.bundle.js:37186trigger @ ionic.bundle.js:11823eventHandler @ ionic.bundle.js:12098