$location.path() allows you to extract out a specific part of your depending on your search string after the slash and excluding the parameters I guess. And if you don't have a search string then it works the same way as the $location.url() method does.