Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
e1faacb65e
1 changed files with 4 additions and 4 deletions
|
|
@ -23,11 +23,11 @@ You can make anonymous modules out of existing classes
|
||||||
```javascript
|
```javascript
|
||||||
//controller class
|
//controller class
|
||||||
var dashboardController = function() {
|
var dashboardController = function() {
|
||||||
this.greeting = "Hello";
|
this.greeting = "Hello";
|
||||||
};
|
};
|
||||||
|
|
||||||
//view class
|
//view class
|
||||||
var dashboardView = function() {
|
var dashboardView = function(ctrl) {
|
||||||
return m("h1", ctrl.greeting);
|
return m("h1", ctrl.greeting);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -43,11 +43,11 @@ var dashboard = {}
|
||||||
|
|
||||||
//controller class
|
//controller class
|
||||||
dashboard.controller = function() {
|
dashboard.controller = function() {
|
||||||
this.greeting = "Hello";
|
this.greeting = "Hello";
|
||||||
};
|
};
|
||||||
|
|
||||||
//view class
|
//view class
|
||||||
dashboard.view = function() {
|
dashboard.view = function(ctrl) {
|
||||||
return m("h1", ctrl.greeting);
|
return m("h1", ctrl.greeting);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue