-
Notifications
You must be signed in to change notification settings - Fork 285
Core Events
Daryl Hedley edited this page May 14, 2014
·
10 revisions
Origin has been built with a module approach and to keep modules separate Origin uses events to pass information between modules and notify them of changes.
Backbone automatically triggers an event when an attribute changes. Please look at the Backbonejs.org website for more information on Events.
Origin also allows modules to plugin into events through events triggered by core views, models and collections. These events can be listened to by using the following syntax:
Origin.on('app:dataReady', function() {
// Triggered when everything is loaded
});
Below is a list of all the core events:
- ('app:dataReady') - Triggered when data is ready just before Origin is initialized.
- ('origin:initialize') - Triggered just before
Backbone.history.start()
is fired.