0

I have an object:

let paramsObj = {
    mode: "resetPassword", 
    oobCode: "dsaSdsxSFXx", 
    apiKey: "OQPzWYkFNe", 
    lang: "en"
   }

I want to use this object as queryParams for router navigate:

this.router.navigate(['/action', { queryParams: paramsObj}]);

But this is doesn't work. What is the correct way to do this?

1

1 Answer 1

1

My bad, I wrote this.router.navigate(['/action', { queryParams: paramsObj}]);, but this is should be this.router.navigate(['/action'], { queryParams: paramsObj}); , and then it work as expected.

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.