Skip to content

Instantly share code, notes, and snippets.

@JBreit
Created February 7, 2016 13:13
Show Gist options
  • Save JBreit/3ff768393bbf5fc5f55f to your computer and use it in GitHub Desktop.
Save JBreit/3ff768393bbf5fc5f55f to your computer and use it in GitHub Desktop.
define(function () {
'use strict';
function BaseController(id) {
this.id = id;
}
BaseController.prototype = {
setModel: function (model) {
this.model = model;
},
render: function (bodyDom) {
bodyDom.prepend('<h1>Controller ' + this.id + ' says "' + this.model.getTitle() + '"</h1>');
}
};
return BaseController;
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment