Comments (10)
Yeah I've got the same question, is there anyway we can trigger any specific one ?
from angular-flash.
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.
I suppose this problem doesn't exist anymore on version 2, right?
from angular-flash.
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.
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.
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.
It looks like an approach is started in this fork: johnsardine@fca1026
from angular-flash.
I'd be happy to see a PR for this when done :)
from angular-flash.
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.
from angular-flash.
Should be possible with 2.4.0 as far as I can see.
from angular-flash.
Related Issues (20)
- Incomplete documentation HOT 1
- Flash Showing Multiple Messages HOT 9
- Error when used without stateparams HOT 1
- Implement Support for "scoped" messages. HOT 1
- New contributor, various proposals HOT 1
- sourceMappingUrl in not minified file breaks Rails 4 HOT 5
- Use the same name across api, repo and package managers HOT 2
- It is not possible to set an default onDismiss callback while using the directive
- Duplication of last alert when dismissing an alert
- Demo page not working (blocked non-HTTPS content)
- Animation not working because of markup/css issue HOT 2
- I cant see a flash mesage when I created it inside a promise
- is multiple container allowed? HOT 3
- All the flashes defined in HTML will be recreated on any specific flash call. HOT 4
- Can dismiss/clear support container?
- Display flash-message on top of other elements
- Multi-line flash message HOT 1
- Do not use generic name "app" for global variable
- Can this be used with AngularJS 4.x HOT 3
- Webpack imports css as ngFlash module instead of js 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-flash.