riot-route
Advanced tools
Comparing version 2.3.14 to 2.3.15
@@ -112,3 +112,3 @@ # Router API | ||
### route(to[, title]) | ||
### route(to[, title, shouldReplace]) | ||
@@ -126,2 +126,13 @@ Changes the browser URL and notifies all the listeners assigned with `route(callback)`. For example: | ||
With the third argument, you can replace the current history. It's useful when the app needs redirect to another page. | ||
```javascript | ||
route('not-found', 'Not found', true) | ||
``` | ||
Internally... | ||
- without `shouldReplace`, `history.pushState()` will be used. | ||
- with `shouldReplace`, `history.replaceState()` will be used. | ||
### route.start() | ||
@@ -128,0 +139,0 @@ |
{ | ||
"name": "riot-route", | ||
"version": "2.3.14", | ||
"version": "2.3.15", | ||
"description": "Simple isomorphic router", | ||
"main": "lib/index.js", | ||
"jsnext:main": "lib/es6.route.js", | ||
"jsnext:main": "dist/es6.route.js", | ||
"directories": { | ||
@@ -8,0 +8,0 @@ "lib": "lib", |
104550