Closed boshinski closed 7 years ago
In your chapter on the EventAggregator, you might want to dispose of the subscriptions in the detached method. At least that is what I picked up in a tutorial by Rob Eisenberg. So maybe something like:
attached() { this.subscribe1 = this.ea.subscribe('custom-element-loaded', obj => { console.log(obj.myProp); console.log(obj.anotherProp); }); } detached() { this.subscribe1.dispose(); }
Sorry for the delay on this one, been focusing on new content and less-so on fixes. This is going out probably tonight.
In your chapter on the EventAggregator, you might want to dispose of the subscriptions in the detached method. At least that is what I picked up in a tutorial by Rob Eisenberg. So maybe something like: