replaces $location for $routeParams