#How To Set A Default GET Query Parameter?

9 messages · Page 1 of 1 (latest)

deep sleet
#

Hi, I want my page /orders to translate itself to orders?page=1

Does anyone know how I can do that when the page initialises via the TS component?

zealous mountain
#

In routes just set that orders goes order page 1

deep sleet
#

Ah nvm I fixed it with this.router.navigate(['/orders'], { queryParams: { page: 1 } });

#

if i put it in app.routing it doesnt work

zealous mountain
#

No I am port that orders to order/page1

upper veldt
upper veldt
#

That doesn't do what you asked. If the user types /orders in the address bar, you won't hava a value for the page parameter