2017-03-14 34 views
0

我用這個ngRepeat,現在我會篩選communicationUserConnections其中communicationUserConnection#執行是真實的。 是有可能做到這一點AngularJS篩選布爾真或假或全部

data-ng-repeat="communicationUserConnection in vm.communicationUserConnections | filter:executed=vm.mySelectedValue. 

如果vm.mySelectedValue是真的不是顯示在那裏執行== true的communicationUserConnection,否則顯示所有communicationUserConnection的

+0

嘗試|過濾:執行:vm.mySelectedValue。或者你總是可以創建一個過濾器函數並在你的控制器中處理它。 –

回答

0

嘗試以下操作:

data-ng-repeat="communicationUserConnection in vm.communicationUserConnections |filter:{'executed':vm.mySelectedValue}"