Giter Site home page Giter Site logo

Comments (10)

wcaaan avatar wcaaan commented on July 20, 2024

Yeah I've got the same question, is there anyway we can trigger any specific one ?

from angular-flash.

brizzbuzz avatar brizzbuzz commented on July 20, 2024

I just used the ng-show/hide attribute to mask the alerts that I don't want shown, but I agree this would be nice to have baked into the directive

from angular-flash.

RoopeHakulinen avatar RoopeHakulinen commented on July 20, 2024

I suppose this problem doesn't exist anymore on version 2, right?

from angular-flash.

RoopeHakulinen avatar RoopeHakulinen commented on July 20, 2024

If I understand you correctly, this is already possible now as Flash.create method returns id that can be used to call Flash.dismiss(id). Please feel to reopen if I missed something.

from angular-flash.

Nytrox avatar Nytrox commented on July 20, 2024

If I have 2 flash-messages in the HTML file (I want a different flash message to show in different places), they still show up in both places.

from angular-flash.

RoopeHakulinen avatar RoopeHakulinen commented on July 20, 2024

Oh right, you mean that it should be possible to have multiple flash-message directives on single page with different messages. I'll have a look at that when I find time to do so. Meanwhile, PRs are welcomed.

from angular-flash.

arithmetric avatar arithmetric commented on July 20, 2024

It looks like an approach is started in this fork: johnsardine@fca1026

from angular-flash.

RoopeHakulinen avatar RoopeHakulinen commented on July 20, 2024

I'd be happy to see a PR for this when done :)

from angular-flash.

holtalanm avatar holtalanm commented on July 20, 2024

completely did not read this issue all the way through when I submitted #32.

Looks like this is exactly the issue I was having. Got it working, and submitted a pull request for it. #33

Text from #32 for those too lazy to click it:

Scenario: I have a tag on my main index template, but I am using bootstrap-ui modals for login and registration to my site. Within the templates for the login and registration modals, I also have tags.

Right now, there is currently no way to distinguish between the different "scopes" of the messages. As in, I would like to define where my messages should go within my angular app on the same page. Currently, when I add flash messages, they show up on the main page AND the modal, which is ugly in my opinion.

I worked on this for a while, and got a working version of angular-flash with "scoped" flash message support. Added new attribute to the directive: "flash-scope" that can be used to define when messages should be displayed within that tag. Preserves all original functionality through the 'default' scope.

Pull Request #33

from angular-flash.

RoopeHakulinen avatar RoopeHakulinen commented on July 20, 2024

Should be possible with 2.4.0 as far as I can see.

from angular-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.