user the $location to implement the page auto goto