# Hoe luister je naar de wijziging in zoekparameters in de URL tijdens het navigeren naar een andere route

**URL:** https://meta.discourse.org/t/how-to-listen-the-change-in-search-params-in-url-while-navigating-to-different-route/265560
**Category:** Support
**Created:** [19 mei 2023 om 13:21 UTC](https://meta.discourse.org/t/how-to-listen-the-change-in-search-params-in-url-while-navigating-to-different-route/265560 "2023-05-19T13:21:58Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Anil\_Tako](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/anil_tako/32/295942_2.png) [@Anil\_Tako](https://meta.discourse.org/u/Anil_Tako)
#### Post date: [19 mei 2023 om 13:21 UTC](https://meta.discourse.org/t/how-to-listen-the-change-in-search-params-in-url-while-navigating-to-different-route/265560/1 "2023-05-19T13:21:58Z")

</div>

Is there any way to listen change in search params while changing the url inside the widget.

Example:  
?search=abc

When I console log the “location.search” it’s empty. However when I refresh the page or click on any other action it console “?search=abc”

I want to trigger action if there is search params in url.
