当我的页面加载树时,在控制台中获取异常。 此外还存在严重的性能问题,使得加载树至少需要30秒。
<div class="col-md-12">
<script type="text/ng-template" id="items_renderer.html">
<div ui-tree-handle>
<span ng-bind-html="item.name| highlight:pattern | trust"></span>
</div>
<ol ui-tree-nodes ng-model="item.items">
<li ng-repeat="item in item.childCategoryList" ui-tree-node
ng-include="'items_renderer.html'"
ng-click="pc.att(item.categoryId)"
ng-hide="!treeFilter(item,pattern,supportedFields) && !dim"
ng-class="{'filtered-out':!pc.treeFilter(item,pattern,supportedFields) && dim}">
</li>
</ol>
</script>
<div ui-tree>
<ol ui-tree-nodes ng-model="item.items">
<li ng-repeat="item in pc.catList" ui-tree-node
ng-include="'items_renderer.html'"
ng-hide="!treeFilter(item,pattern,supportedFields) && !dim"
ng-class="{'filtered-out':!pc.treeFilter(item, pattern,supportedFields) && dim}">
</li>
</ol>
</div>
</div>
vm.catAttList = response.data.data.catAttList;
angular.js:12783 TypeError: Cannot read property '0' of undefined
at Scope.e.init (localhost:8080/web/app/bower_components/angular-ui-tree-master/dist/angular-ui-tree.min.js:6:1243)