Join Kai Gittens for an in-depth discussion in this video Loading model data on a webpage, part of Up and Running with Backbone.js.
- View Offline
…Okay, we've modeled our data.…We've attached the data to a collection.…We've made sure that the models and collections each have their own views.…We've constructed page elements and…we've created templates where we can place our data.…We now need to add some data to this whole process in order to…get some content to display on our web page.…That's what we'll be doing in this movie inside of flowerApp.js.…Now, in the last movie, we created a collection view called app.allFlowersView.…
It had a custom addFlower method that triggered most of the activity I…outlined a few moments ago.…It was a really, really powerful part of the collection view.…All it needs to get going is some model data.…And if we could find some data to plug into this view,…we can get our data to display on a web page.…We can do that with a few lines of code.…Which I'll grab from snippets.txt.…So go over there.…And I'm going to highlight and copy lines 117 to 119, and…go back to flowerApp.js and I'm going to place them directly at the bottom.…
- 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