Merge pull request #9 from cabello/patch-1

Update module docs to receive controller as param in view
This commit is contained in:
Leo Horie 2014-03-20 12:39:31 -04:00
commit 83d25bd5a6

View file

@ -23,11 +23,11 @@ You can make anonymous modules out of existing classes
```javascript
//controller class
var dashboardController = function() {
this.greeting = "Hello";
this.greeting = "Hello";
};
//view class
var dashboardView = function() {
var dashboardView = function(ctrl) {
return m("h1", ctrl.greeting);
};
@ -43,11 +43,11 @@ var dashboard = {}
//controller class
dashboard.controller = function() {
this.greeting = "Hello";
this.greeting = "Hello";
};
//view class
dashboard.view = function() {
dashboard.view = function(ctrl) {
return m("h1", ctrl.greeting);
};