mirror of
https://dev.iopsys.eu/feed/iopsys.git
synced 2026-03-03 07:54:28 +01:00
Adding track by $index and removing lambda func.
This commit is contained in:
parent
b9b6c42023
commit
2f04d960c3
2 changed files with 2 additions and 2 deletions
|
|
@ -55,7 +55,7 @@ angular.module("luci")
|
|||
Object.assign(o.children, children);
|
||||
item = o;
|
||||
}
|
||||
obj.children_list = Object.keys(obj.children).map(key => obj.children[key]);
|
||||
obj.children_list = Object.keys(obj.children).map(function(key) { obj.children[key]; });
|
||||
obj.children_list.sort(function(a, b){
|
||||
return a.index - b.index;
|
||||
});
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@
|
|||
</div>
|
||||
<div id="navbar" class="navbar-collapse collapse">
|
||||
<ul class="nav navbar-nav" auto-active>
|
||||
<li class="dropdown" ng-repeat="item in tree.children_list">
|
||||
<li class="dropdown" ng-repeat="item in tree.children_list track by $index">
|
||||
<a href="#!{{item.path}}" role="button" >{{item.text | translate}} </a>
|
||||
<!--<a href="#!{{item.path}}" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">{{item.text | translate}} <span class="caret"></a>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue