Skip to content

Commit

Permalink
Merge pull request canjs#596 from marshallswain/master
Browse files Browse the repository at this point in the history
Fixing incorrect pushstate.root location in docs.
  • Loading branch information
daffl committed Dec 12, 2013
2 parents 7f83be6 + 9064b84 commit 104e6ef
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions route/pushstate/pushstate.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,14 @@ of the [hash](https://developer.mozilla.org/en-US/docs/Web/API/URLUtils.hash).

## Use

The pushstate plugin uses the same API as [can.route] with only one additional
property - [can.route.pushstate.root]. `can.route.pushstate.root` specifies the part of that pathname that
The pushstate plugin uses the same API as [can.route] with only one additional
property - [can.route.bindings.pushstate.root]. `can.route.bindings.pushstate.root` specifies the part of that pathname that
should not change. For example, if we only want to have pathnames within `app.com/contacts/`,
we can specify a root like:

can.route.pushstate.root = "/contacts/"
can.route.bindings.pushstate.root = "/contacts/"
can.route(":page\\.html");
can.route.url({page: "list"}) //-> "/contacts/list.html"

Now, all routes will start with "/contacts/". The default [can.root.route]
is "/".

Now, all routes will start with "/contacts/". The default [can.root.route]
is "/".

0 comments on commit 104e6ef

Please sign in to comment.