Hi David,
sorry for the delay in answering, I was on leave.
To have access to CONTENT_OTHERDATA and the block component itself you should add the event in the javascript code returned by your "method", not in the "init" one. Please notice that you should stop listening for events if the component is destroyed. For example (I haven't tested this code):
sorry for the delay in answering, I was on leave.
To have access to CONTENT_OTHERDATA and the block component itself you should add the event in the javascript code returned by your "method", not in the "init" one. Please notice that you should stop listening for events if the component is destroyed. For example (I haven't tested this code):
var that = this;
var observer = this.CoreEventsProvider.on('courses_my_courses_updated', function(e) {
// You can access that.CONTENT_OTHERDATA or whatever you want in here. }, this.CoreSitesProvider.getCurrentSiteId());
this.ngOnDestroy = function() {
observer.off(); };
Cheers,
Dani