can-route-pushstate
Advanced tools
Comparing version 3.0.0-pre.6 to 3.0.0-pre.7
@@ -12,3 +12,3 @@ @module {Object} can-route-pushstate | ||
route(":page", { page: "home" }); | ||
route("{page}", { page: "home" }); | ||
route.ready(); | ||
@@ -36,5 +36,5 @@ | ||
```js | ||
route(":page", {page: 'homepage'}); | ||
route("contacts/:username"); | ||
route("books/:genre/:author"); | ||
route("{page}", {page: 'homepage'}); | ||
route("contacts/{username}"); | ||
route("books/{genre}/{author}"); | ||
@@ -49,3 +49,3 @@ route.ready(); // Initializes can-route | ||
```js | ||
route.attr(); //-> {page: "homepage", route: ":page"} | ||
route.attr(); //-> {page: "homepage", route: "{page}"} | ||
``` | ||
@@ -57,11 +57,11 @@ | ||
route.attr('page', 'about'); | ||
route.attr(); //-> {page: "about", route: ":page"} | ||
route.attr(); //-> {page: "about", route: "{page}"} | ||
// without cleaning current route state | ||
route.attr('username', 'veljko'); | ||
route.attr(); //-> {page: "about", route: ":page", username: 'veljko'} | ||
route.attr(); //-> {page: "about", route: "{page}", username: 'veljko'} | ||
// with cleaning current can-route state | ||
route.attr({username: 'veljko'}, true); | ||
route.attr(); //-> {username: "veljko", route: "contacts/:username"} | ||
route.attr(); //-> {username: "veljko", route: "contacts/{username}"} | ||
``` | ||
@@ -73,3 +73,3 @@ | ||
route.attr({genre: 'sf', author: 'adams'}, true); | ||
route.attr(); //-> {genre: "sf", author: "adams", route: "books/:genre/:author"} | ||
route.attr(); //-> {genre: "sf", author: "adams", route: "books/{genre}/{author}"} | ||
``` | ||
@@ -112,3 +112,3 @@ | ||
route.bindings.pushstate.root = "/contacts/" | ||
route(":page"); | ||
route("{page}"); | ||
route.url({page: "list"}) //-> "/contacts/list" | ||
@@ -115,0 +115,0 @@ route.url({foo: "bar"}) //-> "/contacts/?foo=bar" |
{ | ||
"name": "can-route-pushstate", | ||
"version": "3.0.0-pre.6", | ||
"version": "3.0.0-pre.7", | ||
"description": "Pushstate for can-route", | ||
@@ -5,0 +5,0 @@ "homepage": "https://canjs.com", |
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
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
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
37300
13
1