fixing links
This commit is contained in:
parent
2161e0ef25
commit
c736e738ce
211 changed files with 2776 additions and 1876 deletions
|
|
@ -571,19 +571,19 @@ If you've been interested in learning or using Functional Programming in the rea
|
|||
|
||||
Mithril provides a few more facilities that are not demonstrated in this page. The following topics are good places to start a deeper dive.
|
||||
|
||||
- [Routing](routing)
|
||||
- [Web Services](web-services)
|
||||
- [Components](components)
|
||||
- [Routing](routing.md)
|
||||
- [Web Services](web-services.md)
|
||||
- [Components](components.md)
|
||||
|
||||
## Advanced Topics
|
||||
|
||||
- [Compiling templates](compiling-templates)
|
||||
- [Integrating with the Auto-Redrawing System](auto-redrawing)
|
||||
- [Integrating with Other Libraries](integration)
|
||||
- [Integrating with the Auto-Redrawing System](auto-redrawing.md)
|
||||
- [Integrating with Other Libraries](integration.md)
|
||||
|
||||
## Misc
|
||||
|
||||
- [Differences from Other MVC Frameworks](comparison)
|
||||
- [Benchmarks](benchmarks)
|
||||
- [Good Practices](practices)
|
||||
- [Useful Tools](tools)
|
||||
- [Differences from Other MVC Frameworks](comparison.md)
|
||||
- [Benchmarks](benchmarks.md)
|
||||
- [Good Practices](practices.md)
|
||||
- [Useful Tools](tools.md)
|
||||
|
|
|
|||
|
|
@ -108,7 +108,7 @@ Then, to use Mithril, point a script tag to the downloaded file:
|
|||
|
||||
Jordan Humphreys created a gem to allow integration with Rails:
|
||||
|
||||
[https://github.com/mrsweaters/mithril-rails](Mithril-Rails)
|
||||
[Mithril-Rails](https://github.com/mrsweaters/mithril-rails)
|
||||
|
||||
It includes support for the [MSX](https://github.com/insin/msx) HTML templating syntax from Jonathan Buchanan.
|
||||
|
||||
|
|
|
|||
|
|
@ -195,7 +195,7 @@ where:
|
|||
|
||||
The `then` method returns another promise whose computations (if any) receive their inputs from the parent promise's computation.
|
||||
|
||||
A promise is also a getter-setter (see [`m.prop`](mithril.prop)). After a call to either `resolve` or `reject`, it holds the result of the parent's computation (or the `resolve`/`reject` value, if the promise has no parent promises)
|
||||
A promise is also a getter-setter (see [`m.prop`](mithril.prop.md)). After a call to either `resolve` or `reject`, it holds the result of the parent's computation (or the `resolve`/`reject` value, if the promise has no parent promises)
|
||||
|
||||
- **Promise then([any successCallback(any value) [, any errorCallback(any value)]])**
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
## m
|
||||
|
||||
This is a convenience method to compose virtual elements that can be rendered via [`m.render()`](mithril.render).
|
||||
This is a convenience method to compose virtual elements that can be rendered via [`m.render()`](mithril.render.md).
|
||||
|
||||
You are encouraged to use CSS selectors to define virtual elements. See "Signature" section for details.
|
||||
|
||||
|
|
@ -18,7 +18,7 @@ m("div", "Hello"); //yields <div>Hello</div>
|
|||
m("div", {class: "container"}, "Hello"); //yields <div class="container">Hello</div>
|
||||
```
|
||||
|
||||
Note that the output value from `m()` is not an actual DOM element. In order to turn the virtual element into a real DOM element, you must call [`m.render()`](mithril.render).
|
||||
Note that the output value from `m()` is not an actual DOM element. In order to turn the virtual element into a real DOM element, you must call [`m.render()`](mithril.render.md).
|
||||
|
||||
```javascript
|
||||
m.render(document.body, m("br")); //puts a <br> in <body>
|
||||
|
|
@ -183,7 +183,7 @@ m.render(document.body, view);
|
|||
m.render(document.body, view);
|
||||
```
|
||||
|
||||
One common way of using `config` is in conjunction with [`m.route`](mithril.route), which is an unobtrusive extension to links that allow Mithril's routing system to work transparently regardless of which routing mode is used.
|
||||
One common way of using `config` is in conjunction with [`m.route`](mithril.route.md), which is an unobtrusive extension to links that allow Mithril's routing system to work transparently regardless of which routing mode is used.
|
||||
|
||||
```javascript
|
||||
//this link can use any of Mithril's routing system modes
|
||||
|
|
@ -390,7 +390,7 @@ where:
|
|||
m.render(document.body, view);
|
||||
```
|
||||
|
||||
One common way of using `config` is in conjunction with [`m.route`](mithril.route), which is an unobtrusive extension to links that allow Mithril's routing system to work transparently regardless of which routing mode is used.
|
||||
One common way of using `config` is in conjunction with [`m.route`](mithril.route.md), which is an unobtrusive extension to links that allow Mithril's routing system to work transparently regardless of which routing mode is used.
|
||||
|
||||
```javascript
|
||||
//this link can use any of Mithril's routing system modes
|
||||
|
|
@ -455,15 +455,15 @@ where:
|
|||
|
||||
- **Children children** (optional)
|
||||
|
||||
If this argument is a string, it will be rendered as a text node. To render a string as HTML, see [`m.trust`](mithril.trust)
|
||||
If this argument is a string, it will be rendered as a text node. To render a string as HTML, see [`m.trust`](mithril.trust.md)
|
||||
|
||||
If it's a VirtualElement, it will be rendered as a DOM Element.
|
||||
|
||||
If it's a list, its contents will recursively be rendered as appropriate and appended as children of the element being created.
|
||||
|
||||
If it's a SubtreeDirective with the value "retain", it will retain the existing DOM tree in place, if any. See [subtree directives](mithril.render#subtree-directives) for more information.
|
||||
If it's a SubtreeDirective with the value "retain", it will retain the existing DOM tree in place, if any. See [subtree directives.md](mithril.render.md#subtree-directives) for more information.
|
||||
|
||||
- **returns** VirtualElement
|
||||
|
||||
The returned VirtualElement is a Javascript data structure that represents the DOM element to be rendered by [`m.render`](mithril.render)
|
||||
The returned VirtualElement is a Javascript data structure that represents the DOM element to be rendered by [`m.render`](mithril.render.md)
|
||||
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ name("Mary"); //Mary
|
|||
var b = name(); //b == "Mary"
|
||||
```
|
||||
|
||||
It can be used in conjunction with [`m.withAttr`](mithril.withattr) to implement data binding in the view-to-model direction and to provide uniform data access for model entity properties.
|
||||
It can be used in conjunction with [`m.withAttr`](mithril.withattr.md) to implement data binding in the view-to-model direction and to provide uniform data access for model entity properties.
|
||||
|
||||
```javascript
|
||||
//a contrived example of bi-directional data binding
|
||||
|
|
@ -41,7 +41,7 @@ var user = {
|
|||
|
||||
In the example above, the usage of `m.prop` allows the developer to change the implementation of the user name getter/setter without the need for code changes in the controller and view.
|
||||
|
||||
`m.prop` can also be used in conjunction with [`m.request`](mithril.request) and [`m.deferred`](mithril.deferred) to bind data on completion of an asynchronous operation.
|
||||
`m.prop` can also be used in conjunction with [`m.request`](mithril.request.md) and [`m.deferred`](mithril.deferred.md) to bind data on completion of an asynchronous operation.
|
||||
|
||||
```javascript
|
||||
var users = m.prop([]);
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
## m.redraw
|
||||
|
||||
Redraws the view for the currently active module. Use [`m.module()`](mithril.module) to activate a module.
|
||||
Redraws the view for the currently active module. Use [`m.module()`](mithril.module.md) to activate a module.
|
||||
|
||||
This method is called internally by Mithril's auto-redrawing system. Usually you don't need to call it manually unless you are doing recurring asynchronous operations (i.e. using `setInterval`) or if you want to decouple slow running background requests from the rendering context (see the `background` option in [`m.request`](mithril.request.md).
|
||||
|
||||
|
|
@ -8,7 +8,7 @@ By default, if you're using either [`m.route`](mithril.route.md) or [`m.module`]
|
|||
|
||||
`m.redraw` is also called automatically on event handlers defined in virtual elements.
|
||||
|
||||
Note that calling this method will not do anything if a module was not activated via either [`m.module()`](mithril.module) or [`m.route()`](mithril.route). This means that `m.redraw` doesn't do anything when instantiating controllers and rendering views via `m.render` manually.
|
||||
Note that calling this method will not do anything if a module was not activated via either [`m.module()`](mithril.module.md) or [`m.route()`](mithril.route.md). This means that `m.redraw` doesn't do anything when instantiating controllers and rendering views via `m.render` manually.
|
||||
|
||||
If there are pending [`m.request`](mithril.request.md) calls in either a controller constructor or event handler, the auto-redrawing system waits for all the AJAX requests to complete before calling `m.redraw`.
|
||||
|
||||
|
|
|
|||
|
|
@ -106,7 +106,7 @@ where:
|
|||
|
||||
- **Children children**
|
||||
|
||||
If this argument is a string, it will be rendered as a text node. To render a string as HTML, see [`m.trust`](mithril.trust)
|
||||
If this argument is a string, it will be rendered as a text node. To render a string as HTML, see [`m.trust`](mithril.trust.md)
|
||||
|
||||
If it's a VirtualElement, it will be rendered as a DOM Element.
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
## m.sync
|
||||
|
||||
This method takes a list of promises and returns a promise that resolves when all promises in the input list have resolved. See [`m.deferred`](mithril.deferred) for more information on promises.
|
||||
This method takes a list of promises and returns a promise that resolves when all promises in the input list have resolved. See [`m.deferred`](mithril.deferred.md) for more information on promises.
|
||||
|
||||
---
|
||||
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
This is an event handler factory. It returns a method that can be bound to a DOM element's event listener.
|
||||
|
||||
Typically, it's used in conjunction with [`m.prop`](mithril.prop) to implement data binding in the view-to-model direction.
|
||||
Typically, it's used in conjunction with [`m.prop`](mithril.prop.md) to implement data binding in the view-to-model direction.
|
||||
|
||||
This method is provided to decouple the browser's event model from the controller/logic model.
|
||||
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ Because Mithril encourages all entity logic to be done in the model layer, it's
|
|||
|
||||
Models are also responsible for centralizing tasks such as filtering of entity lists and validation routines, so that access to these methods is available across the application.
|
||||
|
||||
DOM manipulation should be done in the view via [`m()` and `config`](mithril). Controllers may explicitly call [`m.redraw`](mithril.redraw), but, if possible, it's preferable to abstract this into a service which integrates with Mithril's auto-redrawing system (see [`m.startComputation` / `m.endComputation`](mithril.computation)).
|
||||
DOM manipulation should be done in the view via [`m()` and `config`](mithril). Controllers may explicitly call [`m.redraw`](mithril.redraw.md), but, if possible, it's preferable to abstract this into a service which integrates with Mithril's auto-redrawing system (see [`m.startComputation` / `m.endComputation`](mithril.computation.md)).
|
||||
|
||||
---
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue