【问题标题】:No Branching in angular-tree角树中没有分支
【发布时间】:2013-11-04 00:55:34
【问题描述】:

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

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>

【问题讨论】:

    标签: css angularjs treeview


    【解决方案1】:

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

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

    现在有 4 个工作示例页面,使用这些不同版本的 Bootstrap 和 Angular。请再看一下——我相信你能做到。

    【讨论】:

      猜你喜欢
      • 2019-02-11
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多