Skip to content

Instantly share code, notes, and snippets.

@pewniak747
Last active December 20, 2015 16:08
Show Gist options
  • Select an option

  • Save pewniak747/6158842 to your computer and use it in GitHub Desktop.

Select an option

Save pewniak747/6158842 to your computer and use it in GitHub Desktop.
Application = new Marionette.Application
# this will replace your mainLayout
Application.addRegions
mainRegion: 'body'
Application.on 'initialize:after', ->
Backbone.history.start()
# OtherView definition
Application.module 'Views.Submodule', (Submodule, Application, Backbone, Marionete, $, _) ->
class Submodule.OtherView extends Marionette.ItemView
Application.start()
# somewhere in a router
Application.mainRegion.show(new Application.Submodule.OtherView)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment