Skip to content
A decoupled message bus for Angular. Demo:
TypeScript HTML CSS JavaScript
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
projects
.editorconfig
.gitignore
.prettierrc
.travis.yml
CHANGELOG.md
LICENSE.md
README.md
angular.json
jest-setup.ts
jest.base.config.js
package.json
rollup.config.js
tsconfig-aot.json
tsconfig.json
tslint.json
yarn.lock

README.md

mesh-jack

Build Status Coverage Status

A decoupled message bus for Angular.

mesh-jack provides a way to communicate between components without having to inject lots of services.

Install

To use mesh-jack in your project, install it via yarn:

yarn add @bakesaled/mesh-jack

or via npm:

npm i @bakesaled/mesh-jack

Usage

Subscribe

constructor(private bus: BusService) {}

ngOnInit() {
    this.bus.channel('channel A').subscribe(message => {
      console.log('message received', message.data);
    });
}

Publish

constructor(private busService: BusService) {}

doPublish() {
    this.busService.publish('channel A', { source: this, data: 'my message' });
}

Examples

Demo page

You can’t perform that action at this time.