Package Exports
- can-route-pushstate
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (can-route-pushstate) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
can-route-pushstate
Pushstate for can-route
API
{Object}
Changes can-route to use pushstate to change the window's pathname instead of the hash.
var route = require("can-route-pushstate");
route(":page", { page: "home" });
route.ready();
route.attr("page", "user");
location.pathname; // -> "/user"Object
- The
{Object}: pushstate object comprises several properties that configure the behavior of [can-route] to work withhistory.pushstate.
Contributing
Making a Build
To make a build of the distributables into dist/ in the cloned repository run
npm install
node buildRunning the tests
Tests can run in the browser by opening a webserver and visiting the test.html page.
Automated tests that run the tests from the command line in Firefox can be run with
npm test