Feature: List projects
Let's build the client for our feature List projects
. Each item in the list consists of a project name and an edit and delete button. Clicking on the name will display a list of repositories; clicking on edit will display an inline form populated with the models' data, and clicking on delete will delete the item from our database. We will return to hook up these three functions later. For now, we will simply display a project list.
What follows is an HTML template ./templates/projects.hbs
for a project item; it contains a placeholder {{_id}}
, which will be replaced by our Backbone application:
<a href="#{{_id}}" data-id="{{_id}}">{{name}}</a> <button class="delete btn btn-mini btn-primary list-btn">del </ button> <button class="edit btn btn-mini btn-primary list-btn spacer ">edit e</button>
Let's define a skeleton Backbone application with all of its pieces in place: ./public/components/vision/vision.js
. We start by defining the Vision...