为了
$scope.phones = [
{"name": "Nexus S",
"snippet": "Fast just got faster with Nexus S."},
{"name": "Motorola XOOM™ with Wi-Fi",
"snippet": "The Next, Next Generation tablet."},
{"name": "MOTOROLA XOOM™",
"snippet": "The Next, Next Generation tablet."}
];
html(玉)
p Search <input ng-model="query">
下面应用了“过滤器| 查询'到整个'电话'。您如何将查询仅应用于电话中的字段?
喜欢(phones.snippet| 过滤器:查询)
li(ng-repeat="phone in phones|filter:query")