Using the $location service, you can remove the search param by assigning it a null value:
In the case when your parameter is null, in your case 'parameter' you can remove it from the url by assigning it a null value like;
$location.search('parameter', null);