2014-05-13 55 views
-4

我試圖在angularjs中實現搜索。當在angularjs中執行搜索時

的記錄的數量是{{array.length}}

當我與一些(樣品)文本篩選記錄,它將顯示的記錄相同(總)數目,但不被過濾的記錄數。

我需要精確過濾的記錄數。

我該如何做到這一點?

Code

+0

請張貼代碼..或撥弄你的工作代碼.. – MarmiK

回答

3

你可以做;

ng-repeat="friendObj in filteredFriends = (friends | filter:search:strict)" 

和ofcourse現在,

{{filteredFriends.length}}