1

When navigating to a url like this:

/some/url;page=1;q=

The url gets automatically changed to:

/some/url;page=1;q=true

Is it possible to disable this so that i could have an empty parameter?

1 Answer 1

2

I've been having the same issue in my application and so far, the only thing that has worked for me is removing the empty url parameter entirely. So if this is the url

/some/url;page=1;q=

when you check the url params, if q === '', you can remove q from the object with delete() to get this

/some/url;page=1

I understand this is not the best solution, I would love to find a fix that does not involving checking for empty url parameters all over my code.

I also understand the benefit of keeping q= in the url, even if the parameter is empty, I have just not found a way to do that yet.

Sign up to request clarification or add additional context in comments.

1 Comment

Thanks for the tip, this is exactly the way i've solved it as well. Keep waiting for a fix on angular's side ;]

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.