mehrdad mehrdad - 1 year ago 89
AngularJS Question

use persian character in query string with angularjs

in query string have persian character but url like this :


I want url like this:


Answer Source

try using decodeURIComponent(yourUrl)

and globally you can use something like this

$rootScope.$on('$locationChangeStart', function (e, newUrl, oldUrl) {
    $location.$$absUrl = decodeURIComponent(newUrl);