$route
, $routeParams
and most functions of $location
are working on the part of url after "#". So, as in your example "/base/test-index.html?code=123#/", angular only sees "/" after "#", nothing else, that's why you got empty $routeParams
. Also, you shouldn't use $routeParams
in resolve function, use $route.current.params
instead.
Try to change
browser().navigateTo '/base/test-index.html?code=123#/'
to
browser().navigateTo '/base/test-index.html#/?code=123'
And in your redirect
console.log $route.current.params