html
<div ng-controller="myAppList">
<div ng-controller="myAppList">
<table class="profile-info" ng-repeat="c in countries | filter: { id: 'sital' }"> <tr>
<th>id</th>
<td>{{c.id}}</td>
</tr>
<tr>
<th>name</th>
<td>{{c.name}}</td>
</tr>
<tr>
<th>city</th>
<td>{{c.city}}</td>
</tr>
</table>
</div>
</div>
javaScript
var myApp = angular.module('myApp', ['ui.directives','ui.filters']);
myApp.controller('myAppList', function myAppList($scope) {
$scope.countries = [
{'city': 'newDelhi','name': 'Delhi', 'id':'india'},
{'city': 'oldDelhi','name': 'Bangalore', 'id':'india'},
{'city': 'bangalore','name': 'UP', 'id':'india'},
{'city': 'jhapa','name': 'Kathmandu', 'id':'Nepal'},
{'city': 'morang','name': 'Bhadrapur', 'id':'Nepal'},
{'city': 'rajbraj','name': 'mandal', 'id':'sital'},
];
});
<div ng-controller="myAppList">
<div ng-controller="myAppList">
<table class="profile-info" ng-repeat="c in countries | filter: { id: 'sital' }"> <tr>
<th>id</th>
<td>{{c.id}}</td>
</tr>
<tr>
<th>name</th>
<td>{{c.name}}</td>
</tr>
<tr>
<th>city</th>
<td>{{c.city}}</td>
</tr>
</table>
</div>
</div>
javaScript
var myApp = angular.module('myApp', ['ui.directives','ui.filters']);
myApp.controller('myAppList', function myAppList($scope) {
$scope.countries = [
{'city': 'newDelhi','name': 'Delhi', 'id':'india'},
{'city': 'oldDelhi','name': 'Bangalore', 'id':'india'},
{'city': 'bangalore','name': 'UP', 'id':'india'},
{'city': 'jhapa','name': 'Kathmandu', 'id':'Nepal'},
{'city': 'morang','name': 'Bhadrapur', 'id':'Nepal'},
{'city': 'rajbraj','name': 'mandal', 'id':'sital'},
];
});
No comments:
Post a Comment