I want to pass dynamic value of default param in $resource. Please look into the Plunker. Here when I had passed default param in 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 want default param timeStamp to be dynamic. currently when i click on Refresh Button the param value goes always same (Check in console)
I need this functionality because IE make cache on GET method and I don't want cache data
This should help you.
each time you invoke
myFactory.query()
method a querystringts
with current timestamp value will appear in url.