The problem was somewhere else, I made the error of passing request parameters in $location.pathlike:
$location.path('/pathA?param1=aaa'); // which kept getting encoded into /pathA%3Fparams1=aaa
As soon as I started passing request parameters in the chain search, the problem disappeared:
$location.path('/pathA').search({params1:'aaa'});
source
share