Comments (3)
Hey,
So my suggestion was to actually add it into the library. I don't think that this URLCreators would be provided from the outside, at least not at the begining. The idea is that many people will be happy to have this HAL implemented. So the idea would be:
- Create a new URLCreator which extends BaseCreator.
- Implement fetchUrl and base with the same signature as the one in Path
- Add it as a possible URL creator in here https://github.com/mgonto/restangular/blob/master/src/restangular.js#L38
- Set this new URLCreator to the factory to a field with the same name as the one you've chosen in the previos step: https://github.com/mgonto/restangular/blob/master/src/restangular.js#L188
That'd be it. With that, you'd have a working URLCreator which is the one that knows how to create URLs and Resources.
After this, submit a PR with this new and you can set this from the outside by saying RestangularProvider.setUrlCreator('hal')
from restangular.
Ok, thanks for the advice. I doubt the URLCreator I need would be generic enough for anyone to use, but if I can make it that way, I'll submit a PR.
from restangular.
Awesome.
Thanks!! Closing Issue.
from restangular.
Related Issues (20)
- Error when injecting restangular with angular 1.6.4 HOT 2
- Nested Services or Nested Configuration
- $remove() id as query parameter HOT 1
- new web app using restangular - www.connecttal.com -
- Element.plain() behaves differently compared to Retangular.stripRestangular
- How to make sync call?
- How to set array of object as parameters using customGET ?
- Did restangular support handling text/html or text/csv response?
- Response for getList SHOULD be an array and not an object or something else HOT 1
- make etag a strong etag when used in if-None-Match HOT 1
- Cancel request - Angular 1.5 HOT 1
- getList() response Json object loss some data
- How do I append query parameter with restangular.oneUrl()? HOT 1
- Details of HTTP request sent by put method ?
- Group by count
- addFullRequestInterceptor has empty headers object
- TypeError: Converting circular structure to JSON while <restangular-object>.put() HOT 1
- Multiple remove on Restangular
- Deprecated?
- Support DELETE method with body
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from restangular.