2017-05-04 3 views
1

코드 :이유 <tr> "태그"에서 작동하지 않는 <NG-용기> "

<table> 
    <tr> 
     <ng-container ng-if="false"> // here ng-container not working 
      <td> 
      <ng-container ng-if="false">abc</ng-container>// here ng-container working fine 
      </td> 
      <td><ng-container ng-if="true">xyz</ng-container></td> 
     </ng-container> 
    </tr> 
</table> 

출력 :

여기
xyz 

예상 출력은 아무도 세포이었다 디스플레이 없다 그러나 <tr><td> 태그 <ng-container ng-if="false"> 사이에 작동하지 않습니다.

이 문제에 대한 아이디어가 있으면 해결책을 얻으십시오.

답변

0

봅니다 테이블 행하기 전에 겨 컨테이너를 넣어

<table> 
    <ng-container ng-if="false"> 
     <tr> 
      <td> 
       <ng-container ng-if="false">abc</ng-container>// here ng-container working fine 
      </td> 
      <td> 
       <ng-container ng-if="true">xyz</ng-container> 
      </td> 
     </tr> 
    </ng-container> 
</table> 
+0

mr.Ravi Ubana 안녕, 난이 시도했지만 깊은에, 나는 분석이 문제를 작동하지 않습니다와 나는 <겨 컨테이너의 NG 같은 몇 가지 상황에 직면

태그 사이에서 작동하지 않고 태그 내부에서 작업하는 조건은 또는 또는 위의 모든 기준에서 정상적으로 작동합니다. 이 문제를 해결할 다른 방법이 있으면 알려주십시오. 고마워 라비. –