I'we試圖在角2應用程序來過濾版本阿爾法22 I'we嘗試過很多辦法如何做到這一點,但沒有什麼工作......角2過濾
<table class="tabulka">
<tr>
<th>ID</th><th>Typ</th><th>Priorita</th><th>Aplikace</th><th>Souhrn</th><th>Hlásil</th><th>Stav</th><th>Termín</th><th>Akce</th>
</tr>
<tr *for="#x of datas">
<td>{{x.ID}}</td>
<td>{{x.Type}}</td>
<td *if="x.Priority == 1" ><img src="./img/red.png"></td>
<td *if="x.Priority == 0"></td>
<td>{{x.Aplication}}</td>
<td>{{x.Summary}}</td>
<td>{{x.Person}}</td>
<td>{{x.State}}</td>
<td>{{x.Date}}</td>
<td class="edit" id="{{x.ID}}"><a href="./editTicket.html">Upravit</a></td>
</tr>
請幫助,如何使用打字稿在角度2中進行過濾。
在角1.4.x中它的工作原理是這樣的:
<table class="tabulka">
<tr ng-repeat="x in datas| filter:searchText|filter:{Aplication:search}| filter:{Person:podle}">
<td>{{x.ID}}</td>
<td>{{x.Type}}</td>
<td>{{x.Priority}}</td>
<td>{{x.Aplication}}</td>
<td>{{x.Summary}}</td>
<td>{{x.Person}}</td>
<td>{{x.State}}</td>
<td>{{x.Date}}</td>
<td class="edit" id="{{x.ID}}"><a href="./editTicket.html">Upravit</a></td>
</tr>
</table>
看看如何實現你自己的[pipe](https://github.com/angular/angular/commit/5b5d31f)(在angular2中''filters'被稱爲'pipes'')。你必須實現你自己的'filter' pipe,因爲[沒有默認的](https://github.com/angular/angular/tree/master/modules/angular2/src/core/pipes)。 –