Last active
August 29, 2015 14:14
-
-
Save workmaster2n/d613de6d58439fb81598 to your computer and use it in GitHub Desktop.
router issue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
this.App = (function(Backbone, Marionette) { | |
var Arc; | |
Arc = new Marionette.Application; | |
Arc.addRegions({ | |
container: "#container" | |
}); | |
Arc.on('before:start', function() { | |
return Arc.workers = App.request('entities:workers'); | |
}); | |
Arc.on("start", function() { | |
if (Backbone.history) { | |
return Backbone.history.start({ | |
pushState: false | |
}); | |
} | |
}); | |
return Arc; | |
})(Backbone, Marionette); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@App = do(Backbone, Marionette) -> | |
Arc = new Marionette.Application | |
Arc.addRegions | |
container: "#container" | |
Arc.on 'before:start', -> | |
Arc.workers = App.request('entities:workers') | |
Arc.on "start", -> | |
if Backbone.history | |
Backbone.history.start(pushState: false) | |
Arc | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, | |
__hasProp = {}.hasOwnProperty; | |
this.App.module("LocationApp", function(LocationApp, App, Backbone, Marionette, $, _) { | |
var API; | |
API = { | |
showLocation: function(id) { | |
return LocationApp.Show.Controller.showLocation(id); | |
} | |
}; | |
LocationApp.Router = (function(_super) { | |
__extends(Router, _super); | |
function Router() { | |
return Router.__super__.constructor.apply(this, arguments); | |
} | |
Router.prototype.appRoutes = { | |
"locations/:id": "showLocation" | |
}; | |
Router.prototype.controller = API; | |
return Router; | |
})(Marionette.AppRouter); | |
return App.on("before:start", function() { | |
return new LocationApp.Router; | |
}); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@App.module "LocationApp", (LocationApp, App, Backbone, Marionette, $, _) -> | |
API = | |
showLocation: (id)-> | |
LocationApp.Show.Controller.showLocation(id) | |
class LocationApp.Router extends Marionette.AppRouter | |
appRoutes: | |
"locations/:id": "showLocation" | |
controller: API | |
App.on "before:start", -> | |
new LocationApp.Router |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, | |
__hasProp = {}.hasOwnProperty; | |
this.App.module("LocationGridApp", function(LocationGridApp, App, Backbone, Marionette, $, _) { | |
var API; | |
API = { | |
showLocationGrid: function() { | |
return LocationGridApp.Show.Controller.showLocationGrid(); | |
} | |
}; | |
LocationGridApp.Router = (function(_super) { | |
__extends(Router, _super); | |
function Router() { | |
return Router.__super__.constructor.apply(this, arguments); | |
} | |
Router.prototype.appRoutes = { | |
"": "showLocationGrid" | |
}; | |
Router.prototype.controller = API; | |
return Router; | |
})(Marionette.AppRouter); | |
return App.on('before:start', function() { | |
return new LocationGridApp.Router; | |
}); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@App.module "LocationGridApp", (LocationGridApp, App, Backbone, Marionette, $, _) -> | |
API = | |
showLocationGrid: -> | |
LocationGridApp.Show.Controller.showLocationGrid() | |
class LocationGridApp.Router extends Marionette.AppRouter | |
appRoutes: | |
"" : "showLocationGrid" | |
controller: API | |
App.on 'before:start', -> | |
new LocationGridApp.Router |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment