Angularjs 如何将依赖项添加到模块';在Angular中的依赖项列表是什么?

Angularjs 如何将依赖项添加到模块';在Angular中的依赖项列表是什么?,angularjs,angular-bootstrap,Angularjs,Angular Bootstrap,我正在尝试使用库,但我无法将“angularBootstrapNavTree”添加到模块的依赖项列表中。有错误 “未知提供程序:angularBootstrapNavTreeProvider您实际上必须将其添加到模块的依赖项列表中,而不是控制器的依赖项中 angular.module('myApp',['angularBootstrapNavTree']) 您的synthax中缺少了一个;和一个},我修复了它: angular. module('myApp'). component('

我正在尝试使用库,但我无法将“angularBootstrapNavTree”添加到模块的依赖项列表中。有错误
“未知提供程序:angularBootstrapNavTreeProvider您实际上必须将其添加到模块的依赖项列表中,而不是控制器的依赖项中

angular.module('myApp',['angularBootstrapNavTree'])

您的synthax中缺少了一个
和一个
}
,我修复了它:

angular.
  module('myApp').
  component('treeList', {
      template: '<abn-tree tree-data="my_data"></abn-tree>',
      controller: function MyCtrl($http, $scope, dataContext, angularBootstrapNavTree) {              
          $scope.my_data = [{
              label: 'Languages',
              children: ['Jade','Less','Coffeescript'],
              classes: ["special", "red"]
          }];      
      } 
   });

您是否正确地包含了以下文件?abn_tree_directive.js,abn_tree。css@Korte是的,我有。
angular.
  module('myApp').
  component('treeList', {
      template: '<abn-tree tree-data="my_data"></abn-tree>',
      controller: function MyCtrl($http, $scope, dataContext, angularBootstrapNavTree) {              
          $scope.my_data = [{
              label: 'Languages',
              children: ['Jade','Less','Coffeescript'],
              classes: ["special", "red"]
          }];      
      } 
   });
angular.module('myApp', ['angularBootstrapNavTree']);