Advertisement
Guest User

Untitled

a guest
Feb 7th, 2016
49
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  1. define(function () {
  2. 'use strict';
  3.  
  4. function BaseController(id) {
  5.  
  6. this.id = id;
  7.  
  8. }
  9.  
  10. BaseController.prototype = {
  11.  
  12. setModel: function (model) {
  13.  
  14. this.model = model;
  15.  
  16. },
  17.  
  18. render: function (bodyDom) {
  19.  
  20. bodyDom.prepend('<h1>Controller ' + this.id + ' says "' + this.model.getTitle() + '"</h1>');
  21.  
  22. }
  23.  
  24. };
  25.  
  26. return BaseController;
  27.  
  28. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement