Comments (2)
Hey, @jobelenus. I think you've just got a simple mismatch of the module and service here. In this case, you're listing djResource
as a module dependency instead of an injected service. The module name is actually djangoRESTResources
. In your gist, you label djangoRESTResources
module as a dependency for the app module, but if you're only going to use djResource
inside your appServices
module, just list it there instead (where you currently list djResource
).
Then, in that service you're defining, you can inject djResource
alongside or replacing the $resource
service that you're currently injecting.
Here's your gist, forked and adjusted: https://gist.github.com/JustinTArthur/9103236
I agree with you on needing a better example. I hope to have a test case directory at some point with both an example Django project and simple AngularJS app.
from angular-django-rest-resource.
Aha! OK I was misunderstanding what "level" (a very bad word/metaphor) the injections were happening on. I suspected that djangoRESTResources
at the app/module "level" was making djResource
available elsewhere for direct injection. This is literally day 1 with angular, but I wanted to make sure that both the "ending-slash" problem and the "let-rest-framework-handle-pagination" could both get solved right out the gate. I admit I don't fully grasp this lazy-load/injection style quite yet. It's a head scratcher, but powerful.
Thanks!
from angular-django-rest-resource.
Related Issues (15)
- Allow trailing slashes in configured resource URL
- save() 405 method not allowed HOT 4
- Fetch related objects HOT 1
- Trailing / now in AngularJS HOT 2
- lib as patches
- Bower version is not up-to-date with this repo HOT 1
- Auto-paginate when array-promising actions receive paginated response.
- Result promise HOT 4
- 'Argument 'fn' is not a function, got object' error when response contains more then one page HOT 1
- Please post some better examples on how to use this
- [enhancement] Add missing bower.json.
- Add a test.
- Iterative Pagination HOT 7
- Last page of paginated request HOT 2
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 angular-django-rest-resource.