Skip to content

Commit

Permalink
Merge pull request #232 from Zenoo/patch-1
Browse files Browse the repository at this point in the history
Fixed typo in the RegExp example
  • Loading branch information
Krasimir Tsonev committed Jan 18, 2019
2 parents e8674ba + 7b8a8b8 commit 1582389
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions README.md
Expand Up @@ -34,10 +34,10 @@ var hash = '#!'; // Defaults to: '#'
var router = new Navigo(root, useHash, hash);
```

The constructor of the library accepts three argument - `root`, `useHash` and `hash`. The first one is the main URL of
The constructor of the library accepts three arguments - `root`, `useHash` and `hash`. The first one is the main URL of
your application. If you call the constructor without parameters then Navigo figures out the root URL based on your routes. However, this proves to lead to bugs so I strongly recommend to set a `root` value.

If `useHash` set to `true` then the router uses an old routing approach with hash in the URL. Navigo anyways falls back
If `useHash` is set to `true` then the router uses an old routing approach with hash in the URL. Navigo anyways falls back
to this mode if there is no History API supported. The `hash` parameter allows you to configure the hash character.

### Adding a route
Expand Down Expand Up @@ -118,7 +118,7 @@ router.notFound(function (query) {

```js
router
.on(/users\/(\d+)\/(\w+)\/?/, function (id, action) {
.on(/user\/(\d+)\/(\w+)\/?/, function (id, action) {
// If we have http://site.com/user/42/save as a url then
// id = 42
// action = save
Expand Down

0 comments on commit 1582389

Please sign in to comment.