28
rated 0 times
[
30]
[
2]
/ answers: 1 / hits: 21227
/ 11 Years ago, wed, january 22, 2014, 12:00:00
i have json data, and i want it show by filter such as genre.
Last question from How to filter JSON-Data with AngularJs? dont work to me.
myapp.js
var myApp = angular.module('myApp', []);
myApp.controller('myApp', function($scope) {
$scope.isoffice = function(apps) {
return apps[0].genre === office;
};
$scope.apps = [
{
id: stardict,
genre: aksesoris,
name: Stardict
},
{
id: libreoffice,
genre: office,
name: LibreOffice
}];
}
my index.html
<div ng-repeat=app in apps | filter:isoffice>
{{apps[0].name}}
</div>
do i missing somethink?
thank you..
More From » json