Advertisement
Guest User

Untitled

a guest
Dec 20th, 2014
144
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.45 KB | None | 0 0
  1. // v0.9.0 of Marionettte will strip down the Modules to bare minimums, removing
  2. // the ability to add initializers. you can re-add them to your module, as-needed,
  3. // by doing this:
  4.  
  5. MyApp.module("Foo", function(Foo, MyApp, Backbone, Marionette){
  6. var initCallbacks = new Marionette.Callbacks();
  7.  
  8. Foo.addInitializer = function(initializer){
  9. initCallbacks.add(initializer);
  10. }
  11.  
  12. Foo.start = function(options){
  13. initCallbacks.run(options, Foo);
  14. }
  15. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement