I am using $location.search to get the params from the url but it gives a null. My url is http://localhost/Site/?user=12345.
app.controller('UrlController', ['$scope', '$log','$location', function($scope,$log,$location) {
var testsearch = $location.search();
console.log(testsearch);
}])
I want to get the value 12345 for the user by parsing the url. How this can be achieved.
how can i parse the params from the url. I checked the documentation https://docs.angularjs.org/api/ng/service/$location