I want to make a query using a $resource in AngularJS such that I use a secondary characteristic of the table. I have a $resource which will give me all the Tweets... (all in coffeescript)
angular.module('resources.movies', ['ngResource'])
.factory("Tweet", ["$resource", "API_PREFIX", ($resource, API_PREFIX) ->
$resource("#{API_PREFIX}/tweets/:id",
{id: "@id"},
update: {method: "PUT"}
)
])
And in the controller (in coffeescript):
$scope.tweets = Tweets.query(recipientID: user.id)
I want to do something like SELECT * from Tweets where tweet.recipientID = id
. It's not using the primary key (so it's not really restful). Can I do this?