Using $location.path() vs $window.location.href
Both $location.path() and $window.location.href are used for navigation in AngularJS, but they work differently: 1️⃣ $location.path() – Angular-Friendly Routing The $location service in AngularJS is designed to update the URL….