Skip to content

Instantly share code, notes, and snippets.

@jish
Created September 20, 2011 05:44
Show Gist options
  • Save jish/1228437 to your computer and use it in GitHub Desktop.
Save jish/1228437 to your computer and use it in GitHub Desktop.
Backbone namespacing
// re: http://japhr.blogspot.com/2011/09/beginning-namespacing-in-backbonejs.html
(function(exports) {
var Cal = exports.Cal = {};
Cal.Appointment = Backbone.Model.extend();
Cal.Appointments = Backbone.Collection.extend();
Cal.AppointmentView = Backbone.View.extend();
Cal.appointmentView = new Cal.AppointmentView();
}(this));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment