angular.js - angularjs的ocLazyLoad问题
迷茫
迷茫 2017-05-15 17:08:16
0
3
781

在angularjs项目中使用ui-router+ocLazyLoad实现按需加载时,自己写了个demo是可以实现的。放到项目中var App = angular.module('app', ['ui.router','oc.lazyLoad'])这样写会报错,如下所示,ocLazyLoad.js确认是加载了这是什么原因?

这是代码`

angular.module('app', ['ui.router','oc.lazyLoad'])
  .config(function ($stateProvider,$locationProvider, $urlRouterProvider,$ocLazyLoadProvider) {

    $stateProvider
      .state('dataQuery.areaMany', {
        url: '/areaMany',
          views: {
            'lazyLoadView': {
              templateUrl: 'app/main/dataQuery/areaMany.html'
            }
          },
          resolve: {
            loadMyCtrl: ['ocLazyLoad',function($ocLazyLoad){
              return $ocLazyLoad.load([
                  'app/main/dataQuery/areaMany.js'
              ])
            }]
          }
      })
  });

`感觉根报的错误没关系啊

迷茫
迷茫

业精于勤,荒于嬉;行成于思,毁于随。

reply all(3)
曾经蜡笔没有小新

The problem reported is about $cookieStore. Can you complete the code? I can’t see the problem

某草草

$cookieStore is referenced in a certain js, but it is not injected

習慣沉默

angular version problem

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!