🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

angular-microbus

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

angular-microbus

Micro angular message bus

0.0.1
latest
Source
npm
Version published
Maintainers
1
Created
Source

angular-microbus

Circle CI

Join the chat at https://gitter.im/asilluron/angular-microbus

Microbus service for angular. 100% ES6 and 100% Tested

Install

npm install angular-microbus ---save

Usage

Import the 'microbus' module and begin using the message bus

let myApp = angular.module('myApp', ['microbus']);

After importing the microbus module, you can use the microbus service anywhere in your app

Push to the bus

function(scope, microbus) {
  microbus.push({some: 'data'}, {key: 'org.namespace'});
}

Consume from the bus

function(scope, microbus) {
  var cb = data => { console.log(`new color added: ${data}!`) };
  microbus.consume(cb, {key: colors});

  // microbus.push('blue', {key: 'org.namespace'}); --> 'new color added: blue!'
}

Development

npm install
npm run tdd

Keywords

angular

FAQs

Package last updated on 28 Feb 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts