Filter in ng-repeat with objects
Why ng-repeat won't support filtering with objects ?
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Sreekanth ReddyRank #726 · 3.2K reputationPosted Nov 28, 2016, 9:00 PM EST
MayankRank #4,018 · 371 reputationPosted Nov 29, 2016, 4:16 AM EST
You selected: {{selectedCar}}
{ Name: "Alto", Createdby: "Maruti",IsActive:"true" },
{ Name: "Figo", Createdby: "Ford",IsActive:"true" },
{ Name: "Innova", Createdby: "Hyundai", IsActive: "true" },
{ Name: "TATA", Createdby: "Nano", IsActive: "true" },
{ Name: "Maruti 800", Createdby: "Maruti", IsActive: "false" },
];
$scope.cars = cars;
$scope.update = function () {
$scope.cars = $filter('filter')(cars, { Createdby: $scope.selectedCar });
}