moff / angular2-flash-messages

Angular 2 flash messages module
52 stars 21 forks source link

angular 2 flash messages show multiple times #22

Closed zap-deepak closed 7 years ago

zap-deepak commented 7 years ago

Sir if we call show message two times it should override old one. But it shows both flash message. Which looks so bad.

moff commented 7 years ago

@zap-deepak hello! Actually this is not a bug, but a feature - it was implemented this way intentionally. I think I'll add an additional parameter to .show() method to show only one message - the latest one. Thank you for a feedback!

zap-deepak commented 7 years ago

@moff Thanks for your feedback. But for now i have used a trick to achieve my goal, i hope it will help to others also.

flashMessages .flash-message{display:none;}

flashMessages .flash-message:last-child{display:block;}

mohit6481 commented 4 years ago

Hi Sir.. did you add any parameter to show() method to show only one message? or I have to add css to achieve this.