remove references to m.module
This commit is contained in:
parent
ab1e91a221
commit
5a786009c5
3 changed files with 3 additions and 3 deletions
|
|
@ -248,7 +248,7 @@ var ContactList = {
|
|||
}
|
||||
}
|
||||
|
||||
m.module(document.body, ContactsWidget)
|
||||
m.mount(document.body, ContactsWidget)
|
||||
```
|
||||
|
||||
In this iteration, both the `ContactForm` and `ContactList` components are now children of the `ContactsWidget` component and they appear simultaneously on the same page.
|
||||
|
|
|
|||
|
|
@ -72,7 +72,7 @@ That organization pattern needlessly ties unrelated aspects of the application t
|
|||
|
||||
`m.redraw` is a method that allows you to render a template outside the scope of Mithril's auto-redrawing system.
|
||||
|
||||
Calling this method while using `m.module` or `m.route` should only be done if you have recurring asynchronous view updates (i.e. something that uses setInterval).
|
||||
Calling this method while using `m.mount` or `m.route` should only be done if you have recurring asynchronous view updates (i.e. something that uses setInterval).
|
||||
|
||||
If you're integrating other non-recurring services (e.g. calling setTimeout), you should use [`m.startComputation` / `m.endComputation`](mithril.computation.md) instead.
|
||||
|
||||
|
|
|
|||
|
|
@ -58,7 +58,7 @@ This redirects to the URL `http://server/#/dashboard/johndoe` and yields:
|
|||
|
||||
Above, `dashboard` is a module. It contains `controller` and `view` properties. When the URL matches a route, the respective module's controller is instantiated and passed as a parameter to the view.
|
||||
|
||||
In this case, since there's only one route, the app redirects to the default route `"/dashboard/johndoe"` and, under the hood, it calls `m.module(document.body, dashboard)`.
|
||||
In this case, since there's only one route, the app redirects to the default route `"/dashboard/johndoe"` and, under the hood, it calls `m.mount(document.body, dashboard)`.
|
||||
|
||||
The string `johndoe` is bound to the `:userID` parameter, which can be retrieved programmatically in the controller via `m.route.param("userID")`.
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue