Update migration, fix various minor issues
- Lot of people couldn't migrate to v1 and plan to reevaluate when v2 is released. - It's "npm" not "NPM". It doesn't stand for anything, and it never has - it was initially chosen simply because it was easy to type. It has a lot of unofficial backronyms with "Node Package Manager" being one of the most common ones, but it's never officially stood for anything as an acronym *or* initialism. - Fixed a few errors in the change log, like non-breaking changes being included in the "Breaking Changes" section and an inaccuracy in the summary of a particular change. - Fixed RawGit URLs to point to GitHack, which is a lighter proxy that offloads caching to Cloudflare instead of also implementing it itself. (It also just uses nginx for all the important server logic, so it scales better.) - Add a few more v0.2 references as appropriate
This commit is contained in:
parent
8186818e10
commit
234b1c9302
26 changed files with 1389 additions and 935 deletions
|
|
@ -43,7 +43,7 @@ var Home = {
|
|||
}
|
||||
|
||||
m.route(document.body, "/home", {
|
||||
"/home": Home, // defines `http://localhost/#!/home`
|
||||
"/home": Home, // defines `https://localhost/#!/home`
|
||||
})
|
||||
```
|
||||
|
||||
|
|
@ -297,9 +297,9 @@ Routing without page refreshes is made partially possible by the [`history.pushS
|
|||
|
||||
The routing strategy dictates how a library might actually implement routing. There are three general strategies that can be used to implement a SPA routing system, and each has different caveats:
|
||||
|
||||
- `m.route.prefix = '#!'` (default) – Using the [fragment identifier](https://en.wikipedia.org/wiki/Fragment_identifier) (aka the hash) portion of the URL. A URL using this strategy typically looks like `http://localhost/#!/page1`
|
||||
- `m.route.prefix = '?'` – Using the querystring. A URL using this strategy typically looks like `http://localhost/?/page1`
|
||||
- `m.route.prefix = ''` – Using the pathname. A URL using this strategy typically looks like `http://localhost/page1`
|
||||
- `m.route.prefix = '#!'` (default) – Using the [fragment identifier](https://en.wikipedia.org/wiki/Fragment_identifier) (aka the hash) portion of the URL. A URL using this strategy typically looks like `https://localhost/#!/page1`
|
||||
- `m.route.prefix = '?'` – Using the querystring. A URL using this strategy typically looks like `https://localhost/?/page1`
|
||||
- `m.route.prefix = ''` – Using the pathname. A URL using this strategy typically looks like `https://localhost/page1`
|
||||
|
||||
Using the hash strategy is guaranteed to work in browsers that don't support `history.pushState`, because it can fall back to using `onhashchange`. Use this strategy if you want to keep the hashes purely local.
|
||||
|
||||
|
|
@ -503,8 +503,8 @@ m.route.prefix = "?"
|
|||
m.route.prefix = "#"
|
||||
|
||||
// set to pathname strategy on a non-root URL
|
||||
// e.g. if the app lives under `http://localhost/my-app` and something else
|
||||
// lives under `http://localhost`
|
||||
// e.g. if the app lives under `https://localhost/my-app` and something else
|
||||
// lives under `https://localhost`
|
||||
m.route.prefix = "/my-app"
|
||||
```
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue