Click here to Skip to main content
15,301,414 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
How to use = on route in place of / routing angular 7 ?

i need to replace id/50 as example by id=50 on URL routing

What I have tried:

on app.module.ts routing

 ngOnInit() {
    let orderID = this.currentRoute.snapshot.paramMap.get('id');

i need to replace order/edit/50 with order/edit/id=50
Updated 23-Dec-19 22:07pm
ZurdoDev 18-Dec-19 7:33am
You could just check the query string and not mess with the routes.
ahmed_sa 18-Dec-19 8:51am
can you give me any example

1 solution


If you follow the example given in the link above, it is default for using the route parameters without specifying the = sign.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900