Skip to content

Instantly share code, notes, and snippets.

@isaiahdw
Created November 23, 2011 20:21
Show Gist options
  • Save isaiahdw/1389785 to your computer and use it in GitHub Desktop.
Save isaiahdw/1389785 to your computer and use it in GitHub Desktop.
App = {
baseurl: Kohana.base_url,
initialize: function(){
this.routes = new this.Router;
Backbone.history.start({pushState: true});
}
};
App.Router = Backbone.Router.extend({
routes: {
"example": "optimization"
},
optimization: function() {
view = new View_Optimization_Index;
view.model = new Model_Optimization;
view.render();
}
});
// Import the template file and start the application
$.ajax(Kohana.media_url + '/js/app/compiled/templates.mustache', {
success: function(response){
$('body').append(response);
App.initialize();
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment