Last active
December 11, 2015 12:59
-
-
Save cjbell/4604828 to your computer and use it in GitHub Desktop.
BigBird Initialiser example #1
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<body data-module="blogs" data-action="index"></body> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
window.Modules = {} || Modules; | |
Modules.Blogs = { | |
initialize: function() { | |
// This gets called everytime the module is equal to blogs | |
new Component(); | |
}, | |
index: function() { | |
// This *only* gets called when the module is blogs and the action is index | |
new OtherComponent(); | |
} | |
}; | |
Modules.Common = { | |
initialize: function() { | |
// This gets called on *every* module. | |
new CommonComponent(); | |
} | |
} | |
new BigBird.Initializer({ modules: Modules }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment