Here is the link I'm using with ui-sref attribute directive:
<a ui-ref="show.hastitle({uuid:item.uuid, title:item.title})">
Title parameter can be a Persian word, and what I expect is such as link below:
http://domain.com/page/54c82de2978af/واژه-فارسی
but ui-sref returns like below:
http://domain.com/page/54c82de2978af/%D9%88%D8%A7%DA%98%D9%87-%D9%81%D8%A7%D8%B1%D8%B3%DB%8C
I've used such solutions as below:
var noneEncodedUri = {
encode: function(str) { return str && str.replace(/ /g, "-"); },
decode: function(str) { return str && str.replace(/-/g, " "); },
is: angular.isString,
pattern: /[^/]+/
};
$urlMatcherFactoryProvider.type('noneEncodedUri', noneEncodedUri);
$stateProvider.state('mystate', {
url: "/{title:noneEncodedUri}"
})
But the rendered link didn't change
how can I stop ui-sref encoding url params completely?