0

I want to parse an iframe URL using FlowRouter.getQueryparams() instead of using window.location.href.split(). I have tried looking into documents, but all it talks about is passing parameters and in-app routing. Is there a way to pass URL like : http://localhost:3000/?id="Awx34R56YUND"&userId="QP90pr5f" to Flowrouter and get the parameters like FlowRouter.getQueryparams('id') and FlowRouter.getQueryparams('userId')?

1 Answer 1

0

Yes you can get query parameters in a URL, see this example below

// route def: /apps/:appId
// url: /apps/this-is-my-app?show=yes&color=red

var color = FlowRouter.getQueryParam("color");
console.log(color); // prints "red"

source: Documentation

Sign up to request clarification or add additional context in comments.

2 Comments

Yeah, I tried that. It always returns me undefined.
try this localhost:3000/?id=Awx34R56YUND&userId=QP90pr5f, I noticed you included them in quotes

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.