From the course: Learning Backbone.js
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
Challenge: Create a template - Backbone.js Tutorial
From the course: Learning Backbone.js
Challenge: Create a template
[MUSIC] It would be absolutely cruel of me to create a challenge where you have to use Backbone models, collections, and views to render some page content like we just did. But I still want to test your overall Backbone view knowledge and can probably do this if you can figure out how to properly build and configure a Backbone template. So, that's the challenge I'm giving you. For this challenge, all you have to do is add code to the index.html file. You don't need to make changes to any CSS, or Backbone code, or some other JavaScript, just to index.html. Now, index.html is supposed to display some already existing model data, a list of the state flowers for the two Pacific Northwest states in the continental US, which are Washington State and Oregon. But if you were to load this page into a web browser right now, the info wouldn't render and some error messages would appear in the browser's console. These errors are the result of Backbone trying to load this data into a template, but…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
(Locked)
Understanding views4m 13s
-
(Locked)
Adding properties to the model view2m
-
(Locked)
Creating and configuring templates7m 1s
-
(Locked)
Creating a collection view5m 43s
-
(Locked)
Loading model data on a webpage4m 38s
-
(Locked)
Challenge: Create a template2m 45s
-
(Locked)
Solution: Create a template2m 42s
-
(Locked)
-
-