Hi I am having the below in my factory
var MyResource = function($resource){
var MyResources = $resource('/test/rest/tests/activities/:userId',
{
userId: '@userId'
},
{
query: {isArray: false}
}
);
return MyResources ;
};
And I am calling the method like
MyResource.get({userid:$stateParams.userId})
.$promise.then(function(data) {
$scope.week1 = data.total1;
$scope.total1 = data.totalAll1;
monthArray = data.tasksMonth;
console.log(monthArray);
init();
});
If the value of $stateParams.userId is testUser, I want the url like below
/test/rest/tests/activities/testUser
But now am getting a url like below
/test/rest/tests/activities?userId=testUser