fix null ref in m.module example in docs

This commit is contained in:
Leo Horie 2014-03-20 12:41:06 -04:00
parent e1faacb65e
commit e038739ea4
2 changed files with 4 additions and 4 deletions

Binary file not shown.

View file

@ -72,11 +72,11 @@
<p>You can make anonymous modules out of existing classes</p> <p>You can make anonymous modules out of existing classes</p>
<pre><code class="lang-javascript">//controller class <pre><code class="lang-javascript">//controller class
var dashboardController = function() { var dashboardController = function() {
this.greeting = &quot;Hello&quot;; this.greeting = &quot;Hello&quot;;
}; };
//view class //view class
var dashboardView = function() { var dashboardView = function(ctrl) {
return m(&quot;h1&quot;, ctrl.greeting); return m(&quot;h1&quot;, ctrl.greeting);
}; };
@ -88,11 +88,11 @@ var dashboard = {}
//controller class //controller class
dashboard.controller = function() { dashboard.controller = function() {
this.greeting = &quot;Hello&quot;; this.greeting = &quot;Hello&quot;;
}; };
//view class //view class
dashboard.view = function() { dashboard.view = function(ctrl) {
return m(&quot;h1&quot;, ctrl.greeting); return m(&quot;h1&quot;, ctrl.greeting);
}; };