September 2015
Intermediate to advanced
268 pages
5h 35m
English
The fourth feature of our to-do application is to give the users the ability to set priority for tasks. We will do this by adding a dropdown with options for priority. The user will be able to select the appropriate priority when creating a task. The priority of the task will be displayed in a new column in our tasks table. The options for the priority will be 1, 2, and 3.
Let's start by adding the priority attribute to our task model. Open the ToDoList module in the todolist.js file and add the attribute to capture the priority of the task. This attribute must be an observable for two-way data binding to work. Your task model should look similar to this:
/* the task */ var task = { name: ko.observable(), description: ...Read now
Unlock full access