GithubHelp home page GithubHelp logo

Comments (2)

JustinTArthur avatar JustinTArthur commented on August 17, 2024

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.

jobelenus avatar jobelenus commented on August 17, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.