0

Is it possible to define several application objects in Backbone.Marionette Application? What is the best practise for creating modular application - to establish a set of application objects with distinct names, or describe specific functionality in modules extended from Marionette.Module?

4

1 回答 1

0

Marionette 包含了应用程序模块的概念。

https://github.com/marionettejs/backbone.marionette/blob/master/docs/marionette.application.module.md

MyApp = new Backbone.Marionette.Application();

MyApp.module("Foo", function(){

  // module code goes here

});

MyApp.start();
于 2013-04-17T15:54:30.713 回答