javascript mvc patetern

Solutions on MaxInterview for javascript mvc patetern by the best coders in the world

showing results for - "javascript mvc patetern"
Kay
25 Mar 2016
1PenguinController.prototype.initialize = function initialize() {
2  this.penguinView.onClickGetPenguin = this.onClickGetPenguin.bind(this);
3};
4
5PenguinController.prototype.onClickGetPenguin = function onClickGetPenguin(e) {
6  var target = e.currentTarget;
7  var index = parseInt(target.dataset.penguinIndex, 10);
8
9  this.penguinModel.getPenguin(index, this.showPenguin.bind(this));
10};
11