aurelia-event-aggregator

Aurelia Unsubscribe Event Aggregator

独自空忆成欢 提交于 2019-12-06 17:16:36
问题 I am using Aurelia Framework with Typescript and in the event aggregator I am able to publish and subscribe to channels. The problem is that I am unable to unsubscribe from a channel. Note: All forms of the subscribe method return a dispose function. You can call this function to dispose of the subscription and discontinue receiving messages. A good place to dispose is either in a view-model's deactivate callback if it is managed by a router, or in its detached callback if it is any other