In ionic4 I have a class “Logger” with static methods.
One method does send an event:
if (!Logger.event) {
Logger.event = new Events();
}
Logger.event.publish("log:added");
Unfortunately, on my home-page I never receive this event.
Subscribed with:
this.events.subscribe("logger", synchronisationinfo => {
console.log("Event received");
});
Any idea why I can’t receive the event?