Build query string from parameters object

前端 未结 4 1206
不知归路
不知归路 2020-12-05 03:54

How to build a url with query parameters in Angularjs.

I see the API $location.search()

the problem is $location(url) is to redirect to the url. In my case,

4条回答
  •  情书的邮戳
    2020-12-05 04:32

    Angular uses the buildUrl() function internally to make a query string from an object of parameters. For now it's impossible to use it in your code because it's private to $HttpProvider unless you want to do some eval() magic.

    Related issues on github:

    • https://github.com/angular/angular.js/pull/3213
    • https://github.com/angular/angular.js/pull/2701

提交回复
热议问题