Confused on how to send custom parameters to a method. I've done this:
.factory('OrdersFactory', ['$resource', 'baseUrl', function ($resource, baseUrl) {
var actionUrl = baseUrl + 'orders/';
return $resource(actionUrl + ':id', {
id: '@id'
}, {
visual: {
method: 'GET',
url: actionUrl + 'visualOrders/:completed/:date',
responseType: 'json'
}
}
}]);
So my default query() gets all my orders, but now I want another method called visual where I specify a completed and a month parameter, and then it calls the URL indicated.
In my controller, I've imported the OrdersFactory and am using it just fine, but can't get the syntax right to call this visual query.
I'm wanting to do something like
$completed = OrdersFactory.visual(true, '2013-08-01');