1.0.4 • Published 8 years ago

bombo v1.0.4

Weekly downloads
3
License
MIT
Repository
github
Last release
8 years ago

Bombo

Bombo is an AngularJS service that lets your broadcast messages in between services, controllers and directives.

Installation

(1) Install using either NPM or Bower

NPM

$ npm install --save bombo

Bower

$ bower install --save bombo

(2) Include bombo.js from node_modules/bombo/ into your project.

(3) Add BomboModule to your main module's list of dependencies.

angular.module('MyApp', [
    'BomboModule'
]);

Usage

To broadcast a message

angular.controller('HomeCtrl', function(bombo) {
    bombo.prep('broadcast-key', 'Message');
});

To retrieve the message

angular.controller('LoginWidgetController', function($scope, bombo) {
    $scope.$on('broadcast-key', function() {
        console.log(bombo.message);
    });
});

License

MIT