$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 also do:
var search = $location.search(); if (search.parameter == 'null') { $location.search({'parameter': null}); }