angularjs控制器模块参考加载空白页

时间:2014-04-12 19:31:58

标签: javascript angularjs yeoman

我正在尝试实施angular-wizard模块。

我有一个由自耕农生成的角度应用程序。我使用bower install angular-wizard来获取模块并在index.html脚本标记正上方的app.js中引用它与其他模块,如angular-resource,angular-cookies等。

主视图加载正常,直到我将mgo-angular-wizard引用添加到控制器依赖项,当添加页面加载空白而控制台中没有错误。 例如:

'use strict';

angular.module('merlinApp', ['mgo-angular-wizard']) // this is where everything breaks
  .controller('MainCtrl', function ($scope) {
    $scope.awesomeThings = [
      'HTML5 Boilerplate',
      'AngularJS',
      'Karma'
    ];
  });

我的index.html包含以下脚本:

<script src="bower_components/jquery/jquery.js"></script>
<script src="bower_components/angular/angular.js"></script>

    <!-- build:js scripts/modules.js -->
    <script src="bower_components/angular-resource/angular-resource.js"></script>
    <script src="bower_components/angular-cookies/angular-cookies.js"></script>
    <script src="bower_components/angular-sanitize/angular-sanitize.js"></script>
    <script src="bower_components/angular-route/angular-route.js"></script>
    <script src="bower_components/angular-wizard/dist/angular-wizard.js"></script>
    <!-- endbuild -->

    <!-- build:js({.tmp,app}) scripts/scripts.js -->
    <script src="scripts/app.js"></script>
    <script src="scripts/controllers/main.js"></script>
    <!-- endbuild -->

1 个答案:

答案 0 :(得分:1)

Lodash(或Underscore)依赖?

如果仍然无效,请尝试在html页面中添加向导指令。