Skip to content

Instantly share code, notes, and snippets.

@nedSaf
Created August 6, 2015 15:05
Show Gist options
  • Save nedSaf/53ceb6ea281fc13611fc to your computer and use it in GitHub Desktop.
Save nedSaf/53ceb6ea281fc13611fc to your computer and use it in GitHub Desktop.
angular $broadcast.
Create broadcast:
$rootScope.$broadcast('scanner-started');
Listen to event:
$scope.$on('scanner-started', function(event, args) {
// do what you want to do
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment