Support for alerting to multiple issues in one flash-alert
BrianHutchison opened this issue · 2 comments
This is somewhat similar to issue 10.
One use case I have now: when alerting to issues when submitting a form there may be a number of issues wrong. For example, a field might be missing, another field could be too long, another might have unicode chars where none were allowed, etc. My backend service sends an array of messages of this type that I want to alert the user to. I could see overloading to allow an array for the message, or worst-case I could build html into the message using paragraph tags or an unordered list, but I need some equivalent functionality.
I'm hoping this angular-flash can be extended for this use, or guidance on how to meet my requirements some other way.
Write a http interceptor that interprets your response. On failure, process and format your messages with anyway you need to fulfill your use case. i.e. build html with the array of error messages. You can then do a flash within this interceptor. This assuming your messaging and flashing is standard within your application.
IMHO this kind of functionality do not belong inside angular-flash.