How to read the token from url in ionic

For the resetPage i have given segment as reset. Now I can navigate to this page using a custom url.

  segment: 'reset'


But along with this URL, I’m also passing a token as


I want to read the token from the URL and display it console.log of reset page. Is it possible? if yes, please someone guide me.