0

I'm getting this error, but don't know where or how to find and fix it.

I've tried a variety of things listed around minification, but none have worked.

My module is defined here:

'use strict';

// create the module
angular.module('mean.dashboard', ['ui.bootstrap', 'xeditable', 'ui.router']);

angular.module('mean.dashboard').run(function(editableOptions) {
  editableOptions.theme = 'bs3'; // bootstrap3 theme. Can be also 'bs2', 'default'
});

Here's a copy of my routes:

'use strict';

angular.module('mean.dashboard')

.config(['$stateProvider',
  function($stateProvider) {
    $stateProvider.state('dashboard', {
      url: '/dashboard',
      templateUrl: 'dashboard/views/index.html',
      controller: 'DashboardController'
    });
  }
]);

The controller is:

'use strict';

angular.module('mean.dashboard')

.controller('DashboardController', ['$scope', '$http', 'Global', 'Dashboard',
  function($scope, $http, Global, Dashboard) {


    // Constants and globals

    $scope.global = Global;
    $scope.package = {
      name: 'dashboard'
    };

    ...

The error from Chrome is below. Do you know why?

THanks!

Error: [$injector:unpr] Unknown provider: DashboardProvider <- Dashboard
http://errors.angularjs.org/1.2.23/$injector/unpr?p0=DashboardProvider%20%3C-%20Dashboard
    at http://localhost:3000/bower_components/angular/angular.js:78:12
    at http://localhost:3000/bower_components/angular/angular.js:3802:19
    at Object.getService [as get] (http://localhost:3000/bower_components/angular/angular.js:3930:39)
    at http://localhost:3000/bower_components/angular/angular.js:3807:45
    at getService (http://localhost:3000/bower_components/angular/angular.js:3930:39)
    at invoke (http://localhost:3000/bower_components/angular/angular.js:3957:13)
    at Object.instantiate (http://localhost:3000/bower_components/angular/angular.js:3977:23)
    at http://localhost:3000/bower_components/angular/angular.js:7274:28
    at http://localhost:3000/bower_components/angular/angular.js:6663:34
    at forEach (http://localhost:3000/bower_components/angular/angular.js:332:20) <section data-ui-view="" class="ng-scope"> angular.js:10061

(anonymous function) angular.js:10061
(anonymous function) angular.js:7357nodeLinkFn angular.js:6707
compositeLinkFn angular.js:6098publicLinkFn angular.js:5994
updateView angular-ui-router.js:2733
(anonymous function) angular-ui-router.js:2697
Scope.$broadcast angular.js:12952
$state.transition.resolved.then.$state.transition angular-ui-router.js:2114
wrappedCallback angular.js:11561
(anonymous function) angular.js:11647
Scope.$eval angular.js:12673
Scope.$digest angular.js:12485
Scope.$apply angular.js:12777
done angular.js:8371
completeRequest angular.js:8585
xhr.onreadystatechange angular.js:8524
4

1 回答 1

5

从依赖项中删除仪表板。Angular 没有找到仪表板。

.controller('DashboardController', ['$scope', '$http', 'Global',
      function($scope, $http, Global) {
于 2014-09-02T14:37:42.760 回答