Created
November 23, 2011 20:21
-
-
Save isaiahdw/1389785 to your computer and use it in GitHub Desktop.
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 = { | |
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