0

I was able to pass a single parameter to Router navigate in Angular 4 like follow and it works fine.

this.router.navigate(['modifyOrder/:labOrderNumber', {labOrderNumber: labOrderNumber}]);

But when I tried to pass 2 parameters, it doesn't work. It didn't take me to modifyOrder page but redirect me to the homepage without giving any error.

this.router.navigate(['modifyOrder/:labOrderNumber/:labInvoiceNumber', {labOrderNumber: labOrderNumber, labInvoiceNumber: labInvoiceNumber}]);

1 Answer 1

1

You can use queryParams property to pass multiple parameters.

this.router.navigate(['modifyOrder', {queryParams: {labOrderNumber: labOrderNumber, labInvoiceNumber: labInvoiceNumber}}])
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.