我已将所需的依赖项和ngJsTree模块包含到我的app.module中。但这仍然会发生:
angular.js:13424 TypeError: scope.tree.jstree is not a function
at m.scope.destroy (ngJsTree.min.js:243)
at ngJsTree.min.js:286
at m.$digest (angular.js:16869)
at m.$apply (angular.js:17133)
at g (angular.js:11454)
at x (angular.js:11652)
at XMLHttpRequest.v.onload (angular.js:11593)
我的包括:
<script src="js/angular.min.js"></script>
<script src="js/angular-route.min.js"></script>
<script src="js/lodash.js"></script>
<script src="js/angularjs-dropdown-multiselect.js"></script>
<script src="https://apis.google.com/js/client.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/jstree/3.0.9/jstree.min.js"></script>
<script src="js/ngJsTree.min.js"></script>
<script src="js/app.js"></script>
我的HTML:
<div js-tree="treeConfig" ng-model="googleDriveFiles" tree-events="ready:readyCB;changed:onItemChanged"></div>
app.js的模块部分:
var app = angular.module('app', [
'ngRoute','ngMaterial','angularjs-dropdown-multiselect','ngJsTree'
]);