Pass Url with underscore and dot

Hi - I am trying to make a http call with an URL which has underscore and dot

like http://localhost:8880?name=File_name_test.jpg

How to encode the underscore and dot in the above url


That is not ionic related question… use javascript uri encoding function…

Thanks for reply,
Javascript uri encoding function does not encode underscore and period.