|
|
The EventManagerObserver is a ES6 class. It's main purpose is to handle any changes occured to the EventManager collection.
|
|
|
To achieve this the EMO instance is created by the IronRouter before the page gets loaded. Any Meteor method call will push the name of the method and a few variables required to find the changed document in the respective collection.
|
|
|
To achieve this the instance is created and restored on reload (F5) by the IronRouter before the page gets loaded. Any Meteor method call will push the name of the method and a few variables required to find the changed document in the respective collection.
|
|
|
|
|
|
It is possible to assign multiple callbacks to the onChanged function of the EMO. Each callback will be inserted if it was not inserted previously. Any changes which the EMO detects will trigger only those callbacks for the currently active route and which selector parameters are matching the Meteor method name.
|
|
|
It is possible to assign multiple callbacks to the onChanged function of the observer. Each callback will be inserted if it was not inserted previously. Any changes which the observer detects will trigger only those callbacks for the currently active route and which selector parameters are matching the Meteor method name.
|
|
|
|
|
|
So for example a onChange callback looks as following:
|
|
|
```
|
... | ... | |