i have a html table which is binding using angularjs using ng-repeat.
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Rajeev PunhaniPosted Jul 4, 2016, 6:22 AM
Hi Sant Roy,
Youcan use ng-if inside ng-repeat
MayankPosted Nov 15, 2016, 7:24 AM
mainApp.controller('FilterStudentsController', function ($scope, $filter) {
var cars = [
{ 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 });
}
});
Html:
Cars:
You selected: {{selectedCar}}
Name
Createdby
{{car.Name}}
{{ car.Createdby}}
Bikesh SrivastavaPosted Jul 9, 2016, 2:36 AM