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

后端 未结 2 804
误落风尘
误落风尘 2021-01-01 14:52

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

2条回答
  •  北荒
    北荒 (楼主)
    2021-01-01 15:13

    It should be

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

提交回复
热议问题