이 코드는 json 배열 인 stacklist_table의 데이터를 반복하여 테이블 형식으로 표시합니다. stacklist_table은 모든 객체의 전체 목록입니다. 하지만 모든 물건을 필요로하지 않아 파이프를 몇 개 적용했습니다. 그리고 나서 마지막 값은 열 및 행을 표시하기 위해 아래에 반복되는 #stacklist로 유지됩니다.ts 파일에서 mfData 값을 가져 와서 각도 2로 작업을 수행합니다.
<table class="table" [mfData]="stacklist_table| selectedcolumn | search : searchQuery | filter: addFilter : selected" #stacklist="mfDataTable">
<thead>
<tr>
<th *ngFor="let colValues of stacklist.data | column: '' : ''">
<mfDefaultSorter by="{{colValues}}">{{colValues|translate}}</mfDefaultSorter>
</th>
</tr>
</thead>
<tbody>
<tr draggable *ngFor="let stack of stacklist.data" [dragOverClass]="'drag-over-border'" [dragData]="stack" [class.active]="checkIfStackElementIsSelected(stack)" (click)="setStacklistRow(stack)">
<td *ngFor="let rowValues of stack | row">{{ rowValues }}</td>
</tr>
</tbody>
</table>
백엔드 유형 스크립트 파일에서이 #stacklist 값에 액세스 할 수 있습니까? typescript 파일에 적용된 모든 파이프가 끝나면 최종 스택리스트가 필요합니다. 어떻게해야할까요?
'@ Pipe'가 적용된 데이터가 필요하다면'component.ts'에 파이프를 적용 할 수도 있습니다 – SrAxi