GitXplorerGitXplorer
k

angular-subscribe

public
3 stars
0 forks
0 issues

Commits

List of commits on branch master.
Unverified
2a12e872621273255b16209c7212d4fc77aa2f1f

chore(README): fix the travis-ci badge

kkasperlewau committed 10 years ago
Unverified
a21b2559e8c909bd739833346de4b33876fa4c51

chore(README): update readme

kkasperlewau committed 10 years ago
Unverified
9b3d818d10a48bf02b5c6a34e8741e84fac4ea92

feat(travis): add travis ci

kkasperlewau committed 10 years ago
Unverified
12426d4bdd0af4c1fa6aa07f249205809151aece

Initial commit

kkasperlewau committed 10 years ago

README

The README file for this repository.

angular-subscribe travisci

Adds a $subscribe method to the $scope prototype. $on listeners with automagic de-registration.

installation

  /** with bower **/
  bower install angular-subscribe --save
  <script src="path/to/angular-subscribe/dist/angular-subscribe.js"></script>

  /** with jspm **/
  jspm install angular-subscribe --save
  import 'angular-subscribe';

usage

  angular.module('your_module_name', [ 'angular-subscribe' ]);
  $scope.$subscribe('event', callbackFn);
  /** becomes **/
  var unsub = $rootScope.$on('event', callbackFn);
  $scope.$on('$destroy', unsub);

testing

npm install; npm test

License

MIT © Kasper Lewau