2

I have an angular landing page, the application will start with a bunch of query parameters, I want to read those parameter in the app.component, is there any way to read those parameter without using Router? I'm using UIRouter for the navigation.

7
  • 1
    Why don't you want to use the router? / Why cant you use the Router? Commented Jun 3, 2018 at 9:33
  • document.location ?? Commented Jun 3, 2018 at 9:34
  • @Antoniossss maybe he is having a service worker installed wouldnt direct dom access destroy that? Commented Jun 3, 2018 at 9:35
  • How would I know? Commented Jun 3, 2018 at 9:36
  • you can use location.search and parse it Commented Jun 3, 2018 at 10:01

1 Answer 1

3

You can use

window.location.href

and parse query string from there.

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.