can-route
Advanced tools
Comparing version 4.0.0-pre.6 to 4.0.0-pre.7
@@ -62,3 +62,3 @@ /*jshint -W079 */ | ||
// indicate that the hash is set to look like the data | ||
var serialized =canRoute.data.serialize(), | ||
var serialized = canReflect.serialize( canRoute.data ), | ||
route = routeParam.getMatchedRoute(serialized), | ||
@@ -169,3 +169,3 @@ path = routeParam.paramFromRoute(route, serialized); | ||
* | ||
* @signature `route.ready()` | ||
* @signature `route.start()` | ||
* | ||
@@ -178,3 +178,3 @@ * Sets up the two-way binding between the hash and the can-route observable | ||
* | ||
* route.ready(); | ||
* route.start(); | ||
* route.data.page; // -> "home" | ||
@@ -189,3 +189,3 @@ * ``` | ||
* | ||
* After setting all your routes, call `route.ready()`. | ||
* After setting all your routes, call `route.start()`. | ||
* | ||
@@ -195,6 +195,10 @@ * ```js | ||
* route("{type}/{id}"); | ||
* route.ready(); | ||
* route.start(); | ||
* ``` | ||
*/ | ||
ready: function (val) { | ||
console.warn("Use can-rotue.start() instead of can-route.start()"); | ||
canRoute.start(); | ||
}, | ||
start: function(val){ | ||
if (val !== true) { | ||
@@ -201,0 +205,0 @@ canRoute._setup(); |
@@ -86,3 +86,3 @@ @function can-route can-route | ||
route('{page}', {page: 'home'}); | ||
route.ready(); | ||
route.start(); | ||
``` | ||
@@ -204,3 +204,3 @@ | ||
```js | ||
route.ready(); | ||
route.start(); | ||
``` | ||
@@ -242,3 +242,3 @@ | ||
route('{page}/{section}'); | ||
route.ready(); | ||
route.start(); | ||
@@ -255,3 +255,3 @@ route.data.page = 'contact'; | ||
route('{page}', { section: 'email' }); | ||
route.ready(); | ||
route.start(); | ||
@@ -271,3 +271,3 @@ route.data.page = 'contact'; | ||
route('{page}/{section}'); | ||
route.ready(); | ||
route.start(); | ||
@@ -287,3 +287,3 @@ route.data.page = 'two'; | ||
route('{section}'); | ||
route.ready(); | ||
route.start(); | ||
@@ -290,0 +290,0 @@ route.data.page = 'home'; |
{ | ||
"name": "can-route", | ||
"version": "4.0.0-pre.6", | ||
"version": "4.0.0-pre.7", | ||
"description": "Observable front-end application routing for CanJS.", | ||
@@ -58,2 +58,3 @@ "homepage": "https://canjs.com/doc/can-route.html", | ||
"can-map": "^4.0.0-pre.9", | ||
"can-observe": "^2.0.0-pre.10", | ||
"can-stache-key": "^1.0.0-pre.12", | ||
@@ -60,0 +61,0 @@ "detect-cyclic-packages": "^1.1.0", |
@@ -130,3 +130,3 @@ @function can-route.data data | ||
// call ready after the AppViewModel is fully initialized | ||
route.ready(); | ||
route.start(); | ||
}); | ||
@@ -133,0 +133,0 @@ ``` |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
56517
11
17
1007