Code Monkey home page Code Monkey logo

Comments (6)

tehmaestro avatar tehmaestro commented on May 22, 2024 1

Hi, I don't use the plugin anymore. It can be closed.

If anybody wants to show a flash message after a page reload, probably the best pattern is storing an indicator in localStorage and reading that indicator after the page was refreshed.

from ember-cli-flash.

poteto avatar poteto commented on May 22, 2024

That's an interesting use case. Out of curiosity, why do you need to refresh the page to clear i18n? I'm hesitant about adding localStorage to the addon.

from ember-cli-flash.

tehmaestro avatar tehmaestro commented on May 22, 2024

Let's say the API requests have some information that is translated in English. Then the user goes to settings and changes the language to French. I want to refresh the page so that any "en" data in ember-data is flushed, and future API requests bring the correct data, in the correct language.

Is there a better way to do this, one that doesn't require a page refresh? Thanks.

from ember-cli-flash.

rmariuzzo avatar rmariuzzo commented on May 22, 2024

Interesting question, I would like to contribute somehow to make something similar. My use case is as follow:

  1. Save a resource.
  2. Do XHR request. Server says OK.
  3. Add a message: β€œThe resources X was created!” (not render).
  4. Transition to another route like resource listing.
  5. Have the message rendered.

Is that possible @poteto?

from ember-cli-flash.

blimmer avatar blimmer commented on May 22, 2024

@rmariuzzo I use something similar to this. Does this gist help you?

from ember-cli-flash.

sbatson5 avatar sbatson5 commented on May 22, 2024

@tehmaestro were you able to find a solution for this? Wondering if this issue can be closed.

from ember-cli-flash.

Related Issues (20)

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.