Skip to content

joshualat/angularjs-shared-service

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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");

About

$shared service to avoid using $rootScope directly

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published