Sha256: 9e894499ac5138e3097e49edc8e5c05ab84ddc11abcb56ea52b1bf000177f1f7

Contents?: true

Size: 332 Bytes

Versions: 2

Compression:

Stored size: 332 Bytes

Contents

angular.module("hyperadmin")
  .factory "Flash", ($rootScope) ->
    queue = []
    currentMessage = { }

    $rootScope.$on "$viewContentLoaded", ->
      currentMessage = queue.shift() || { }

    setMessage: (type, message) ->
      queue.push
        type: type
        message: message

    getMessage: ->
      currentMessage

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
hyper_admin-0.4.0 app/assets/javascripts/hyper_admin/angularjs/services/flash.js.coffee
hyper_admin-0.3.0 app/assets/javascripts/hyper_admin/angularjs/services/flash.js.coffee