A module for flash messages

Added by: Sam Deering





Stars: 0

Watchers: 0

Forks: 0

Module Description


An Angularjs module for flash messages

###Example ####HTML

    <div class="form-group">
        <label>Class (".active" makes it appear)</label>
        <input class="form-control" ng-model="fm.class" type="text" style="display:block;" />
    <div class="form-group">
        <textarea class="form-control" ng-model="fm.content" style="display:block;"></textarea>
    <div class="form-group">
        <label>Button 1 text</label>
        <input class="form-control" ng-model="fm.button_1_text" type="text" style="display:block;" />
    <div class="form-group">
        <label>Button 1 class</label>
        <input class="form-control" ng-model="fm.button_1_class" type="text" style="display:block;" />
    <div class="form-group">
        <label>Button 2 text</label>
        <input class="form-control" ng-model="fm.button_2_text" type="text" style="display:block;" />
    <div class="form-group">
        <label>Button 2 class</label>
        <input class="form-control" ng-model="fm.button_2_class" type="text" style="display:block;" />
    <label style="display:block;">(There is also button_1_click and button_2_click, but for security, nope, not going to happen)</label>
    <br />
    <button class="btn btn-primary" ng-click="flash_message.set(fm)">Try it</button>




  • class - A class to add to the message container. "active" is what activates the message.
  • content - The text/html content of the message.
  • button_1_text - The text of the first button. Default "Ok".
  • button_1_click - The function for the first button. Default "function(){object.close();}".
  • button_1_class - The class for the first button. Default "".
  • button_2_text - The text of the second button. Default "Cancel".
  • button_2_click - The function for the second button. Default "function(){object.close();}".
  • button_2_class - The class for the second button. Default "hidden".


  • .set(data) - "data" is the options above.
  • .close() - Closes the flash message.


  • Bower - ckc-angularjs-flash-message
  • Add "flash_message" to your app's dependencies
  • Add "flash_message" to your app's controller dependencies
  • Add "flash_message.js" and "flash_message.css" to your scripts/css

Module stats last updated: 2015-04-19 02:32:43

Disclaimer: Some data on this page may have been gathered from the authors GitHub respository. If you see any mistakes or outdated information please let us know. Thanks!