angularjs - I used $location.search to set paramValue, but if i select other link also it get appended to new url, how to solve it -
in angularjs used $location.search() set paramvalue in url i.e
if change dropdown executesearch() called.
executesearch() { $location.search('type', task); } result : index.html#/search?type=task.
but if click on other link coming
index.html#/help?type=task
how make specific function only..if click on other link ?type=task appended. how remove paramvalues("? folled paramvalues") if click on other links.
<select class="search-dropdown-select" ng-change="searchbar.executesearch()" ng-model="searchbar[item.model]" ng-options="item.name item in searchbar.{{item.options}}"></select>
when clicking on other link use $location.url()
. clear of query parameters.
function navigate(path) { $location.url(path); }
<a href ng-click="navigate('/help')">help</a>
Comments
Post a Comment