[PWA][SOLVED] Url parameters

Hi,

In a PWA, how could I read the parameters supplied to an URL?

For example:

 http://localhost:8100/?code=123

I would like to now the value 123 of code

In Angular, I would used ActivatedRoute like

this.route.params.subscribe(params => {
   console.log(params['code'];
});

Should I do the same and import @angular/router in my project or there is a better solution? I would be happy if I could spare the add on of a package/library

platform.getQueryParam

Platform

2 Likes

Thx for the quick answer, works like a charm

Furthermore it was the last missing piece of my Facebook login in a PWA analysis…sounds all good now, so double thx :wink:

1 Like