Join Kai Gittens for an in-depth discussion in this video Configuring routes, part of Up and Running with Backbone.js.
- View Offline
Routers allow us to create a navigation structure in our Backbone web app.…With routers, we can create links to pretty much anything we want.…We're not going to cover every single route concept, but in this video…we'll cover more than enough to get you started doing some very powerful things.…Routes are built using the same key/value pair syntax we use to create events.…The key in this case will be the actual route link.…And it's best to think of it as an actual URL.…
An actual web page address that's accessible from a web browser.…The value will be the custom method we want to invoke when someone navigates to…the route link or URL.…Now, there's a really important point you need to understand about Backbone routes.…The common use of routes is to execute a method that's wrapped in the value…when the value's respective route link gets loaded into a web browser.…Thanks to recent browser technologies, like the history API, routes and…their methods are accessible from a web browser's Back button.…
This may not sound like a big deal, but…
- What is Backbone.js?
- Understanding how MVC libraries work
- Adding properties to a model
- Creating a collection of models
- Adding properties to a model view
- Loading model data on a web page
- Configuring routes
- Finding Backbone resources