Debug with emitted events - ensure to remove this once PR is done

This commit is contained in:
Warren Buckley
2020-04-02 15:36:16 +01:00
parent df19ca45a0
commit cc62525378

View File

@@ -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;