/* Services */
angular.module('dn.services', ['ngResource'])
.value('version', '0.1')
.factory('Cards', function($resource) {
return $resource('cards/:cardId.json', {}, {
query: {
method: 'GET',
params: { cardId: 'cards' },
isArray: true
}
});
})
;
// Controller
function dnCtrl($scope, $routeParams, Cards) {
$scope.cards = Cards.query();
};
Here's an example where I change the style based on the index of the item: http://jsfiddle.net/4LhN9/22/
--
You received this message because you are subscribed to the Google Groups "AngularJS" group.
To post to this group, send email to ang...@googlegroups.com.
To unsubscribe from this group, send email to angular+u...@googlegroups.com.
Visit this group at http://groups.google.com/group/angular?hl=en.