1.6.3 • Published 7 years ago

ng-message-bus v1.6.3

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

ng-message-bus

NPM version Bower version Built with Grunt License Build Status: Linux Coverage Status

message_bus web client for AngularJS

Example

angular.module('some_app', ['message-bus']).controller('noticeController', [
  '$scope', 'MessageBus'
  ($scope, MessageBus)->
    MessageBus.start(httpParams: ignoreLoadingBar: true)

    subscribeFn = (notice) -> $scope.notice = notice

    $scope.subscribe = ->
      MessageBus.subscribe "/notice", subscribeFn

    $scope.unsubscribe = ->
      MessageBus.unsubscribe "/notice", subscribeFn
])

Installing

With bower: bower install ng-message-bus

With npm: npm install ng-message-bus

For Rails, installing with rails-assets is recommended

In Gemfile:

source 'https://rails-assets.org' do
  gem 'rails-assets-ng-message-bus'
end

License

Licensed under the MIT license