fix formatting in docs
This commit is contained in:
parent
30879a1d78
commit
b559118832
27 changed files with 248 additions and 116 deletions
|
|
@ -77,9 +77,11 @@
|
|||
<div class="col(9,9,12)">
|
||||
<h2 id="m-module">m.module</h2>
|
||||
<hr>
|
||||
<p><a href="#usage">Usage</a>
|
||||
<a href="#unloading-modules">Unloading modules</a>
|
||||
<a href="#signature">Signature</a></p>
|
||||
<ul>
|
||||
<li><a href="#usage">Usage</a></li>
|
||||
<li><a href="#unloading-modules">Unloading modules</a></li>
|
||||
<li><a href="#signature">Signature</a></li>
|
||||
</ul>
|
||||
<hr>
|
||||
<p>A module is an Object with two keys: <code>controller</code> and <code>view</code>. Each of those should point to a Javascript function.</p>
|
||||
<p>When using <code>m.module</code>, Mithril instantiates controllers as if they were class constructors. However, controllers may return objects if you want to use that Javascript feature to have more fine-grained control over a controller's lifecycle.</p>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue