use $location.path() to redirect pages