This commit is contained in:
Leo Horie 2015-03-30 09:23:50 -04:00
parent 6ef5ed3d07
commit 1e9ddc637e
3 changed files with 10 additions and 8 deletions

View file

@ -8,7 +8,7 @@
- [Running clean up code on route change](#running-clean-up-code-on-route-change)
- [Redirecting](#redirecting)
- [Reading the currently active route](#reading-the-currently-active-route)
- [Mode abstraction](#mode abstraction)
- [Mode abstraction](#mode-abstraction)
---
@ -78,7 +78,7 @@ This redirects to the URL `http://server/#/dashboard/johndoe` and yields:
Above, `dashboard` is a module. It contains a `controller` and a `view` properties. When the URL matches a route, the respective module's controller is instantiated and passed as a parameter to the view.
In this case, since there's only route, the app redirects to the default route `"/dashboard/johndoe"`.
In this case, since there's only one route, the app redirects to the default route `"/dashboard/johndoe"`.
The string `johndoe` is bound to the `:userID` parameter, which can be retrieved programmatically in the controller via `m.route.param("userID")`.