Advertisement
Guest User

Untitled

a guest
May 30th, 2015
228
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function AbstractController(model, view) {
  2.     if(model && view) {
  3.         this._model = model;
  4.         this._view = view;
  5.         this._view.bind(this.callback.bind(this));
  6.     }
  7. };
  8.  
  9. AbstractController.prototype.setModelField = function(modelField, modelValue) {
  10.     this._model.setField(modelField, modelValue);
  11. };
  12.  
  13. AbstractController.prototype.getModelField = function(modelField) {
  14.     this._model.getField(modelField);
  15. };
  16.  
  17. AbstractController.prototype.callback = function () {
  18.     throw new Error('Not implemented!');
  19. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement