$shared service to avoid using $rootScope directly
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
LICENSE
README.md
shared.coffee
shared.js

README.md

angularjs-shared-service

$shared service to avoid using $rootScope directly

Basic usage

Get / Set

$shared.set('someKey', 'hello!')
$shared.get('someKey')

Watch

$shared.watch('someKey', function(newVal) {
  alert(newVal);
});

Emit / On

$shared.on($scope, "someSignal", function(event, data) {
  alert(data)
});

$shared.emit("someSignal", "someMessage");