jstools-events
v0.1.3
Published
simple javascript events handler
Downloads
4
Readme
jEngine: Events
Installation
npm install jstools-events --save
or
bower install jstools-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');
}]);