I notice that when I passed a parameter that is an array to $location.search(), it was encoded as in the following example
$location.path('/somePath').search('ids[]=', [1, 2, 3]);
becomes
/somePath?ds%5B%5D=1&ds%5B%5D=2&ds%5B%5D=3
Is there a way to avoid the url encoding?