fix null ref in m.module example in docs
This commit is contained in:
parent
e1faacb65e
commit
e038739ea4
2 changed files with 4 additions and 4 deletions
Binary file not shown.
|
|
@ -72,11 +72,11 @@
|
|||
<p>You can make anonymous modules out of existing classes</p>
|
||||
<pre><code class="lang-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);
|
||||
};
|
||||
|
||||
|
|
@ -88,11 +88,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);
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue