$location manages the URL in a single-page application (SPA) and facilitates navigation without reloading the page, handling path, hash, and search parameters.
$location
$location.path('/newPath');