Is it possible to work with Restangular with 2 different APIs? I would like to have setBaseUrl() for both.
相关问题
- Design RESTful service with multiple ids
- Axios OPTIONS instead of POST Request. Express Res
- Plain (non-HTML) error pages in REST api
- angularJS: ui-router equivalent to $location.searc
- Separate AngularJS Controllers Into Separate Files
相关文章
- Passing variable through URL with angular js
- Watch entire object (deep watch) with AngularJS
- Angular ng-if change span text
- Can ng-show directive be used with a delay
- AngularJS $routeParams vs $stateParams
- Got ActiveRecord::AssociationTypeMismatch on model
- Multiple parameters in AngularJS $resource GET
- How to set class/style of accordion heading in Ang
@wickY26 has the right answer, but I wanted to add something important.
If you are going to minify your code, you need to use inline annotation like so:
Note the square brackets.
just create two or more Restangular service and config them as you want and inject your module which one you want to use...
UPDATE
this code from restangular github page
instead of global config (although you can still set global config for shared properties) create Restangular factories like these and inject them your controller...