Fix TOC link, remove m.request.run ref (#1456)
This commit is contained in:
parent
624c0d5fa1
commit
4e9505335c
1 changed files with 3 additions and 5 deletions
|
|
@ -258,7 +258,7 @@ m.route(document.body, "/edit/pictures/image.jpg", {
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
### Changing route prefix
|
### Changing router prefix
|
||||||
|
|
||||||
The router prefix is a fragment of the URL that dictates the underlying [strategy](routing-strategies.md) used by the router.
|
The router prefix is a fragment of the URL that dictates the underlying [strategy](routing-strategies.md) used by the router.
|
||||||
|
|
||||||
|
|
@ -402,14 +402,12 @@ module.export = {
|
||||||
```javascript
|
```javascript
|
||||||
// index.js
|
// index.js
|
||||||
function load(file, done) {
|
function load(file, done) {
|
||||||
m.request({
|
m.request(file, {
|
||||||
method: "GET",
|
|
||||||
url: file,
|
|
||||||
extract: function(xhr) {
|
extract: function(xhr) {
|
||||||
return new Function("var module = {};" + xhr.responseText + ";return module.exports;")
|
return new Function("var module = {};" + xhr.responseText + ";return module.exports;")
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.run(done)
|
.then(done)
|
||||||
}
|
}
|
||||||
|
|
||||||
m.route(document.body, "/", {
|
m.route(document.body, "/", {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue