Is there a way to dynamically pass a default parameter value in $resource? Take a look at the Plunker for reference. In the code snippet below, I've set the default parameter in the factory as:
app.factory('myFactory', ["$resource", function($resource) {
return $resource('http://google.com', {timeStamp : (new Date()).getTime()}, {
query : {
method : 'GET',
isArray : true,
cache : false
}
})
}]);
I'm looking to make the default param timeStamp dynamic. Currently, when I click on the Refresh Button, the param value remains the same (Check in console)
This functionality is needed because IE caches data for the GET method and I want to avoid cached data