ng-message-bus
v1.6.3
Published
angular port for message_bus
Downloads
29
Maintainers
Readme
ng-message-bus
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