Debug with emitted events - ensure to remove this once PR is done
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
/** Used to broadcast and listen for global events and allow the ability to add async listeners to the callbacks */
|
||||
|
||||
/*
|
||||
Core app events:
|
||||
Core app events:
|
||||
|
||||
app.ready
|
||||
app.authenticated
|
||||
@@ -12,12 +12,14 @@
|
||||
*/
|
||||
|
||||
function eventsService($q, $rootScope) {
|
||||
|
||||
|
||||
return {
|
||||
|
||||
|
||||
/** raise an event with a given name */
|
||||
emit: function (name, args) {
|
||||
|
||||
console.log(`Emitting event: ${name}`, args);
|
||||
|
||||
//there are no listeners
|
||||
if (!$rootScope.$$listeners[name]) {
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user