How to get current URL parameters of a friendly URL?

My app is running on desktop and mobile browsers and mobile apps. I need to get the URL parameters.

For example this URL:

I need to open my app and get the paramenters ‘user’ and ‘5456’ inside it.

How could I achieve this using Ionic 2?

DeepLink plugins will do this on desktop?

let url = ""
let split_url = url.split('/')
console.log(split_url[1]) // Displays user
console.log(split_url[2]) // Displays 5456

How can I get the URL itself?

1 Like

You can use window.location.href