Comments (2)
When you subscribe, the EA will return an object to you with a dispose
method so that you can later call it to unsubscribe or dispose the subscription. I recommend that you simply store the subscription object and call dispose
in the deactivate
callback. This is usually a pattern that works well.
from event-aggregator.
Thanks!
from event-aggregator.
Related Issues (20)
- subscribe should return subscriptionInfo object with an unsubscribe/cancel function HOT 22
- How to subscribe to window events? HOT 1
- Improve Error Message HOT 7
- Subscribe to event with function call HOT 5
- Feat proposal: decorators HOT 12
- Ability to subscribe / publish array of channels HOT 10
- Debouncing subscribed callback invocation HOT 1
- eventAggregator subscribe 2x router:navigation:complete HOT 1
- Dispose all... (possibly scoped to the current view model) HOT 2
- event-aggregator not working with dependency injection HOT 14
- Is it possible to subscribe to multiple or all the events? HOT 1
- Chrome console not outputting error thrown in subscribe callback HOT 4
- aurelia-event-aggregator Not Triggering Event Handler When "messageType" is an Object HOT 3
- Porting
- There is no way to unsubscribe an event HOT 2
- question - Subscribe by interface to match multiple event types? HOT 3
- Fix 1.0.3 Release Tag HOT 2
- Publish order HOT 4
- Feature Request - Method to get all Event Names HOT 8
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from event-aggregator.