Error in the request how to fix it?

$http.get('http://example.com/get_phone_number.php?number=*100#&name='+name).success(function(data) { // console.log(data); }); 

error after # such sign does not work

  • Just escape this symbol - Pavel Dura
  • How? It is possible - Odilbek Rahmonov
  • But after # such signs name = test does not work - Odilbek Rahmonov

1 answer 1

Try using the function: encodeURIComponent

Usage example: http://javascript.ru/encodeuricomponent

  • Please try to publish detailed answers containing a specific example of the minimum solution, supplementing them with a link to the source. Answers –references (as well as comments) do not add knowledge to the Runet. - Nicolas Chabanovsky
  • Well, I understand you, thank you. - vlamug