Join Kai Gittens for an in-depth discussion in this video Configuring routes, part of Up and Running with Backbone.js.
…So with the routers, we're creating links to methods and treating the links as URLs.…You may be thinking that at some point we have to create anchor tags to…these links just so others can access them.…But in fact, we've done this already.…In this movie, we're going to review how this was accomplished and…then finish building our route.…But let me point out something first.…So right now, we're looking at MyRouter.js file.…The route on line 7 that's attached to…the no copy method is just an empty set of quotes.…
This is how I attach the route to my homepage.…So, if someone lands on my index.html page, the no copy method will be invoked.…For the rest of the routes on lines 8 thru 10,…these are the routes that I'm already linking to on my webpage.…They were added while doing the views work in chapter 3,…when I used views to render my model data.…Let's recap this by first looking at flowerApp.js.…When I created three model instances I gave each one a link property.…
Take note that this property matches the route name.…
- 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