$location.search() to set an url
$location.search()
the search parameter which is passed to the search() is set by a form. selecting and deselecting an element ca
search()
You can use $location.search({}) to clear all at once.
$location.search({})