1

I want to use angularjs to read the full query string:

http://localhost/test#/?param1=abc&param2=def

I know that var query = $location.search(); would give my an object containing each param as key-value pair.

But I want to extract the full string param1=abc&param2=def, and use this param elsewhere. Without having to know what parameters are inside the string.

Is that possible?

1 Answer 1

2

Angular don't have method to get the complete querysting.

You can use url() to get the URL and then extract the querystring.

var queryString = $location.url().split('?')[1];
Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.