Use $location.search() to parse the URL parameters