0.1.3 • Published 9 years ago

jengine-events v0.1.3

Weekly downloads
1
License
MIT
Repository
github
Last release
9 years ago

jEngine: Events wercker status

Bower version npm version Build Status

Installation

npm install jengine-events --save

or

bower install jengine-events --save

Usage

var obj = new Events();

obj.on('foo', function () {
  flag = true;
});

obj.trigger('foo');

AngularJS Module

angular.module('myApp', ['jstools.events'])

  .controller('AppCtrl', ['$scope', 'Events', function ($scope, Events) {

    var obj = new Events();

    obj.$$on('foo', function () {
      flag = true;
    });

    obj.$$trigger('foo');

  }]);