minder.service.js 488 B

1234567891011121314151617181920
  1. angular.module('kityminderEditor')
  2. .service('minder.service', function() {
  3. var callbackQueue = [];
  4. function registerEvent(callback) {
  5. callbackQueue.push(callback);
  6. }
  7. function executeCallback() {
  8. callbackQueue.forEach(function(ele) {
  9. ele.apply(this, arguments);
  10. })
  11. }
  12. return {
  13. registerEvent: registerEvent,
  14. executeCallback: executeCallback
  15. }
  16. });