0

我正在使用角树。它工作正常,但分支时节点的间距不起作用......即它们都在直线上而不是彼此相距一定距离。我也在浏览器控制台上收到此错误。

Error: Lexer Error: Unexpected next character  at columns 36-36 [?] in expression ['level-' + 1 + (row.branch.selected ? ' active':'')].
at Error (<anonymous>)
at throwError (http://localhost:8080/AngularJS/js/scripts/angular.js:6309:11)
at lex (http://localhost:8080/AngularJS/js/scripts/angular.js:6272:9)
at parser (http://localhost:8080/AngularJS/js/scripts/angular.js:6466:16)
at http://localhost:8080/AngularJS/js/scripts/angular.js:7080:29
at compileToFn (http://localhost:8080/AngularJS/js/scripts/angular.js:8973:16)
at Object.Scope.$watch (http://localhost:8080/AngularJS/js/scripts/angular.js:8305:19)
at http://localhost:8080/AngularJS/js/scripts/angular.js:13541:11
at nodeLinkFn (http://localhost:8080/AngularJS/js/scripts/angular.js:4774:13)
at compositeLinkFn (http://localhost:8080/AngularJS/js/scripts/angular.js:4365:15) <li ng-repeat="row in tree_rows | filter:{visible:true} track by row.branch.uid" ng-animate="'abn-tree-animate'" ng-class="'level-' + {{ row.level }} + (row.branch.selected ? ' active':'')" class="abn-tree-row ng-scope abn-tree-animate-enter-setup"> 

这是我的html文件

<ul class="nav nav-list abn-tree">
 <li ng-show="header" class="nav-header">{{ header }}</li>
 <li ng-repeat="row in tree_rows | filter:{visible:true} track by row.branch.uid" ng- animate="'abn-tree-animate'" ng-class="'level-' + {{ row.level }} + (row.branch.selected ?  ' active':'')" class="abn-tree-row"><a id="{{ row.label }}" ng-  click="user_clicks_branch(row.branch)"><i ng-class="row.tree_icon" ng-click="row.branch.expanded = !row.branch.expanded" class="indented tree-icon"> </i><span   class="indented tree-label">{{ row.label }}</span></a></li>
</ul>
4

1 回答 1

0

您似乎正在尝试使用我的angular-bootstrap-nav-tree

该项目最近已更新,可以在 Bootstrap 2 或 Bootstrap 3 下正常工作,也可以与 Angular 1.1.5 或 Angular 1.2.0 一起使用(现在是 MIT 许可证)

现在有 4 个工作示例页面,使用这些不同版本的 Bootstrap 和 Angular。请再看一下-我相信您将能够使其工作。

于 2013-11-03T16:55:34.310 回答