angularjs - Angular: Change classes of elements by clicking one, inside ng-repeat -
there ng-repeat
, in there many li's. superior li's visible, while minor ones not displayed. clicking on 1 superior li, minor should visible/invisible. li's equated in code, means there no embedding code purport superior or minor. distinguishable id. superior li's has id 1, while minor get's id 1.1.
<li class="list-table" ng-repeat="row in rows" id="{{row.first}}.{{row.second}}" ng-click="toggle_rows(row)") <div style="list-cell"> <p>{{row.first}}</p> <p>{{row.second}}</p> <p>{{row.name}}</p> <div> </li>
i tried several things got stuck. advice appreciated! in advance!
Comments
Post a Comment