Ognjen
Ognjen

Reputation: 2588

How to set $location.path and $location.search at the same time?

I am using Angular ngRouter. I need to change the url path along with search parameters. I know about $location.path and $location.search, but is there a function that sets them both?

Upvotes: 0

Views: 950

Answers (1)

Trott
Trott

Reputation: 70055

Use $location.url() to change path, search, and hash all at once.

Upvotes: 1

Related Questions