Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions routes-defining.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Most of the time your routes will look like the above:
```
In this case if the user were to go to: `http://localhost:8080/#!/about` the section defined at `require('../sections/About')` would be run (`bigwheel` will go through `About`'s `init`, `resize`, `animateIn`, `animateOut`, `destroy` methods)

**_Note currently `bigwheel` uses "hash bang" routing but could easily be made to handle the history api_**
**_Note currently `bigwheel` uses "push state" routing but could easily be made to use hash bang urls. To use hash bang urls set `pushState: false`_**

**_Gotcha: In all these examples we've been defining routes inline in objects.
It might be tempting to require sections outside of the routes object but this can cause a large gotcha for instance if we did:_**
Expand Down Expand Up @@ -125,4 +125,4 @@ module.exports = {

As you can see to define multi section routes you just define your sections in an array using the standard form or using a section descriptor. What will happen is that when the route resolves all the sections will be run in tandem so all `init`, `resize`, `animateIn`, `animateOut`, and `destroy` calls will happen at the same time for all multi sections.

The reason why this is handy is that if you define `Menu` as an `Object` instead of a `function` `Menu` will always be persistent and it can react to sections coming in for instance highlighting the correct menu button in the `animateIn` function.
The reason why this is handy is that if you define `Menu` as an `Object` instead of a `function` `Menu` will always be persistent and it can react to sections coming in for instance highlighting the correct menu button in the `animateIn` function.