I have a resource defined as follows:
app.factory("DatumItem", function($resource) { return $resource('/data/:id', {id: '@id'}); });
In my opinion, I have:
<div ng-click="go('/datum/' + d.to_param)">Test</div>
where go () is defined in my controller as:
$scope.go = function (params) { $location.path(params); };
For the subject in question, d.param is equal to
TkZUOWZwcnc9Uldo%0ASzRvd2FiWk
But when I call DatumItem.get () with the correct ID, it changes the identifier to
TkZUOWZwcnc9Uldo%250ASzRvd2FiWk
Is there a way to prevent% from being encoded to% 25 in this case?
I tried a combination of using encodeURI, encodeURIComponent to no avail.
Any help would be greatly appreciated, thanks!
angularjs urlencode angular-resource
Nader hendawi
source share