Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // v0.9.0 of Marionettte will strip down the Modules to bare minimums, removing
- // the ability to add initializers. you can re-add them to your module, as-needed,
- // by doing this:
- MyApp.module("Foo", function(Foo, MyApp, Backbone, Marionette){
- var initCallbacks = new Marionette.Callbacks();
- Foo.addInitializer = function(initializer){
- initCallbacks.add(initializer);
- }
- Foo.start = function(options){
- initCallbacks.run(options, Foo);
- }
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement