How to programmatically create URLs with AngularJS

后端 未结 3 1348
旧时难觅i
旧时难觅i 2021-02-02 08:14

Currently I am toying with the AngularJS framework. I\'m using the $route service for deep linking into my single-page application.

Now I would like to navigate inside m

3条回答
  •  后悔当初
    2021-02-02 08:28

    As you can see in the source code here (v.1.1.0):

    https://github.com/angular/angular.js/blob/v1.1.0/src/ngResource/resource.js#L228

    and here:

    https://github.com/angular/angular.js/blob/v1.1.0/src/ngResource/resource.js#L247

    Angularjs doesn't use internally encodeURIComponent for managing URI strings but neither make available the used functions. These functions are internal to the module (what I think is a pity).

    If you want to manage your URIs in exactly the same way that AngularJS, maybe you can copy these functions from the source to your code and make your own service for that.

提交回复
热议问题