Created
December 17, 2012 10:42
-
-
Save marvi/4317355 to your computer and use it in GitHub Desktop.
Revisions
-
marvi created this gist
Dec 17, 2012 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,32 @@ _.templateSettings = { interpolate: /\{\{=(.+?)\}\}/g, evaluate: /\{\{(.+?)\}\}/g }; // We begin by creating a namespace `xx`. Choose the name you want. var App = {}; // Then the view namespace. // We will put class (starting with an upper case), // and instances (starting with a lower case) shared in the whole application App.views = {}; // Then the model namespace. // A collection share the Model name but end with a `s` (the plural of the Model). // For exemple: // // * Model: Todo // * Collection: Todos // // Class and instances(global in the whole application) will be present under this namespace. App.models = {}; // Put under this namespace home made utils functions. App.util = {}; // Event aggregator App.vent = _.extend({}, Backbone.Events); $(function() { App.router = new App.Router(); });