2017-03-01 1 views
0

아래 그림과 같은 데이터 목록이 하나 있습니다. enter image description here각도 js에 해당 부모 ID의 하위 레코드를 표시하는 방법

해당 테이블에서 하위 메뉴를 볼 수 있습니다. 해당 열에서 "3 도트 사용 가능"은 해당 열에 대해 자식 행이 있으면 "3 도트 사용 가능"을 의미합니다. 이제 "3 도트"를 클릭 할 때 다른 페이지를 리디렉션하고 해당 행 레코드를 표시해야 할 때처럼하고 싶습니다.

"3 도트"를 클릭하면 모든 하위 행이 나타납니다. 아래 그림을 볼 수 있습니다. enter image description here

하지만 난 디스플레이는 자식 레코드 만

해당 할 필요가 "3 점"을 클릭 할 때 같이 할 수 없었던하지만 난 3 "를 클릭 할 때 같이 할 수 없었던 도트 "는 해당 하위 레코드 만 표시해야합니다. 예 : 이미지 1의 애널리틱스 열에 대한 하위 열에서 "3 도트"를 클릭 한 경우 하위 애그리마가 필요하지 않은 애널리틱스의 하위 레코드 만 표시해야합니다. 개체에 따라 달라집니다 사실

 <tr> 
     <th>Sr. No.</th> 
     <th>Parent Id</th> 
     <th>Original Label</th> 
     <th>New Label</th> 
     <th>Url</th> 
     <th>Enable</th> 
     <th>Action</th> 
    </tr> 
</thead> 
<tbody> 
    <tr ng-repeat="ChildMenu in ChildMenuList" > 
    <td >{{$index+1}}</td> 
    <td>{{ChildMenu.menu_id}}</td> 
    <td >{{ChildMenu.original_label}}</td> 
    <td >{{ChildMenu.new_label}}</td> 
    <td >{{ChildMenu.url}}</td> 
    <td >{{ChildMenu.enabled}}</td> 
    <td> 
    <a class="edit-icon" data-toggle="modal" data-target="#myModalEdit" ng-click="getData(store)"><img src="../app/img/edit-icon.png" alt="Edit"></a> 
    </td> 


</tr> 

답변

0

초 이미지 2에 대한 첫 번째 이미지

 <tr> 
     <th>Sr. No.</th> 
     <th>Menu Name</th> 
     <th>Enabled</th> 
     <th>Child Menu</th> 
    </tr> 
</thead> 
<tbody> 
<tr ng-repeat="menus in menuList" > 
    <td >{{$index+1}}</td> 
    <td >{{menus.menu}}</td> 
    <td>{{menus.enable}}</td> 
    <td ng-if="menus.menu_items"><span class="text-left logo-dashboard"> 
    <a ui-sref="configureChildMenuState"title="Cilk me"><span  class="glyphicon glyphicon-option-horizontal"></span></a> 
    </td> 
    <td ng-if="!menus.menu_items"></td> 

</tr> 

에 대한

코드.

반복 객체를 공유 할 수 있다면 도와 드리겠습니다.

관련 문제