Git Product home page Git Product logo

angular-contentful-service's People

Contributors

angular-cli avatar bretmorris avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

angular-contentful-service's Issues

Reload service?

I'm using your angular-contentful-service and I find it really simple for basic retrieval. However, in a slightly more complex app, I retrieve a single Entry (via the getEntry function) using a url param defined in my routes but can't get fresh data as I navigate around. Here is how I define the route so you can see that "id" is a param.

export const appRoutes: Routes = [ { path: "project/:id", component: ProjectDetailComponent, runGuardsAndResolvers: 'paramsChange' }

When I navigate to a different "project" (meaning the route is updated to replace the "id" param), a call is made to the getEntry function again with the new id but the Entry content is never updated (so no call is made out to Contentful's CDN which I can verify by watching network traffic).

If I manually refresh the page, I can see the network call out to Contentful and the response and then my page shows the updated content.

Is there a way to force a call to getEntry to load fresh data? Or do I need to somehow destroy the service (or my component) and reload it? I'd much rather use your service versus making raw HTTP curl calls.

Thanks

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.