我有像$scope.posts = posts.query()
帖子是ngResrouce
angular.module('flapperNews')
.factory('posts', ['$resource', function($resource) {
return $resource('api/posts.json/:id', {id: "@id"})
}]);
检索对象
[
0: {
$hasKey: "object:4",
title: "some text",
content: "hello world there",
upvotes: 0
}
1: {
$hasKey: "object:5",
title: "Lorem ipsum is dolor",
content: "hello world there",
upvotes: 0
}
2: {
$hasKey: "object:6",
title: "When there is nothing to share",
content: "hello world there",
upvotes: 0
}
]
我怎样才能获得" title"从这个检索到的对象,所以我可以使用它 AngularJS形式验证? (验证新帖子标题是否唯一)