Skip to content

Instantly share code, notes, and snippets.

angular.module('app').factory('pubsub', function() {
var o = $({});
$.subscribe = function() {
o.on.apply(o, arguments);
};
$.unsubscribe = function() {
o.off.apply(o, arguments);
};