Sha256: a790b3b98a7f69b94bc997395e3edd18f1e1743435814803adfbf684dd8282c4

Contents?: true

Size: 528 Bytes

Versions: 4

Compression:

Stored size: 528 Bytes

Contents

var Class = new Marionette.Application();

Class.addRegions({
  //Add application regions here
});

//Navigate to specific route
Class.navigate = function (route, options) {
  options || (options = {});
  Backbone.history.navigate(route, options);
};

//Returns current route
Class.getCurrentRoute = function () {
  return Backbone.history.fragment;
};

Class.on('initialize:after', function () {
  //Things to do after app initialize
  if (Backbone.history) {
    Backbone.history.start({
      pushState: true
    });
  }
});

Version data entries

4 entries across 2 versions & 1 rubygems

Version Path
marionette_dust-0.1.0 test/lib/generators/marionette_dust/install/templates/app/assets/javascripts/app.js
marionette_dust-0.1.0 test/lib/generators/marionette_dust/scaffold_and_submodule/templates/app/assets/javascripts/app.js
marionette_dust-0.0.3 test/lib/generators/marionette_dust/install/templates/app/assets/javascripts/app.js
marionette_dust-0.0.3 test/lib/generators/marionette_dust/scaffold_and_submodule/templates/app/assets/javascripts/app.js