Quantcast
Channel: Ionic Forum - Latest topics
Viewing all articles
Browse latest Browse all 70612

Publishing/Subscribing to events stopped working

$
0
0

@wmccafferty wrote:

Hello,

The following code stopped working with the latest Ionic:

public onWhateverEvent() {
	console.debug('triggered');
}

public authenticateUser(accessToken): boolean {
	console.debug('about to subscribe');
	this.events.subscribe("whatever", this.onWhateverEvent);
	console.debug('about to publish');
	this.events.publish("whatever");
}

Running this code results in the following error: TypeError: this._channels is undefined

Is there a new way to publish/subscribe?

Thank you,
Billy McCafferty

Posts: 2

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 70612

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>