search

Home  >  Q&A  >  body text

angular.js - angular-ui-bootstrap 报错无法使用?

1、我在webpack.config.js里这样写

entry: {
        app: ['webpack-dev-server/client?http://localhost:8080','./app/js/app.js'],
        vendor: ['jquery', 'bootstrap', 'angular', 'angular-ui-router', 'angular-ui-bootstrap']
    }

引入:

var app = angular.module('app', ['ui.router', 'ngGrid', 'ui.bootstrap']);

2、然后控制台就报错了

这个到底怎么回事呢?

给我你的怀抱给我你的怀抱2744 days ago556

reply all(1)I'll reply

  • 世界只因有你

    世界只因有你2017-05-15 17:01:49

    Do you have any controllers under the "app" module? If yes, write it like this
    so that the module can access the controller under the module

    var app = angular.module('app', ['ui.router', 'ngGrid', 'ui.bootstrap','app-controller']);

    Referenced from stack overflow

    reply
    0
  • Cancelreply