Brian
Brian

Reputation: 872

How to read parameter from url in Angular 5+ without Routing

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.

Upvotes: 2

Views: 558

Answers (1)

Antoniossss
Antoniossss

Reputation: 32550

You can use

window.location.href

and parse query string from there.

Upvotes: 3

Related Questions