I\'m searching for a possibility to replace characters in the ui-sref, respecting the URL of a target.
.state(\'base.product.detail\', { url: \'detail/:p
Very easy approach:
In the controller, where the ui-sref is used (or even better in a separate service):
$scope.beautyEncode = function(string){ string = string.replace(/ /g, '-'); return string; };
In the template:
The routing itself wasn't changed, angular did the routing still correctly.