How to use Querystring with $location.path() in AngularJS

aikutto

I want to redirect user to another page after successful login using query string. If I copy & paste to browser's address bar http://example.com/#/login?ref=/path/to/redirect it works fine. But if I use

$location.path("/login?ref=/path/to/redirect");

url looks like

http://example.com/#/login%3Fref=/path/to/redirect

How can I decode %3F to '?' ? Thanks

Stepan Suvorov

It should be

$location.path('/login').search('ref', '/path/to/redirect')

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

How to use Querystring with $location.path() in AngularJS

From Dev

How to use $location in Directives in AngularJs

From Dev

How to use $location in Directives in AngularJs

From Dev

How to get Previous path location in angularjs

From Dev

How do I parse the location path in AngularJS?

From Dev

How to use the Querystring instead of ';'

From Dev

How to use querystring in JavaScript

From Dev

AngularJS and location.path()

From Dev

How to Pass QueryString in window.location.href?

From Dev

AngularJS : How to use $state.go to pass querystring in nested state routing

From Dev

Specifying location.path in angularjs

From Dev

Problems with AngularJS $location.path

From Dev

AngularJS $location.path not redirecting

From Dev

XPath syntax - how to use position() in a complex location path

From Dev

How to configure redis to use environment variable as the dist location path?

From Dev

$location.path(path) vs $location.url(url) in AngularJS

From Dev

How to use queryString() in elasticsearch (java API)?

From Dev

How can i use the querystring for knex?

From Dev

Pass $scope along with $location.Path() in AngularJS

From Dev

Angularjs - changing location.path from modal

From Dev

AngularJS $location get path before hash

From Dev

Get location path plus anchor link in AngularJS

From Dev

AngularJS $location.path(url) not Redirecting

From Dev

AngularJS $location.path() not working for returnUrl

From Dev

Angularjs - $location.path with slashes in url

From Dev

AngularJS $location.path looping back to root

From Dev

angularjs $location.path.replace not working

From Dev

Angularjs - changing location.path from modal

From Dev

AngularJs: $location.path not working correctly

Related Related

HotTag

Archive