Franco Manzur Franco Manzur - 8 months ago 55
Ajax Question

angularjs - url get encoded in ajax call

i got service which makes an ajax call (GET).

var _getMemeValues = function(category_id, attribute_id) {
return $http.get('/api/meme_​values?category_id='+category_id +'&​attribute_id='+attribute_id);

When i make that call the url get encoded like this.

How can i solve this? I Tried converting it with toString(), decodeURIComponent but it didn't work


There is a control character(LRM) in your string

'/api/meme_​values?category_id='+category_id +'&​attribute_id='
here       ^                         and here ^

i.e after meme_ and before attribute_id= just remove it and you'll be fine.
This character usually comes from editors like ms word.