use || $location.search() to handle unit testing case
check if location.search() object has keys first
removed onRouteChangeStart. Will use resolver instead