//设置 
.config [
      '$ocLazyLoadProvider'
      ($ocLazyLoadProvider) ->
        # We configure ocLazyLoad to use the lib script.js as the async loader
        $ocLazyLoadProvider.config
          debug: true
          events: true
          modules: [
            {
              name: 'ui.grid'
              files: [
                '//cdn.bootcss.com/angular-ui-grid/3.1.1/ui-grid.js'
              ]
            }
          ]
        return
    ]
//路由
.state 'admin.user.123', {
      url: '123/'
      templateUrl: '123.html'
      controller: '123Ctrl'
      resolve: {
        deps: ['$ocLazyLoad',
          ($ocLazyLoad)->
            return $ocLazyLoad.load('ui.grid').then(
              ()->
                return $ocLazyLoad.load('123Ctrl.js')
            )
        ]
      }
      data: {title: '123'}
    }

 

相关文章:

  • 2021-09-07
  • 2022-01-05
  • 2021-12-01
  • 2022-12-23
  • 2021-08-24
  • 2021-08-06
  • 2021-04-20
  • 2021-07-09
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-12-12
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案