官术网_书友最值得收藏!

Chapter 2. Creating a To-do List Application

In the previous chapter, we built a simple address book application and introduced the skeleton we will be using in this book to develop more complex applications. This chapter will walk you through building a more complex application, a to-do list. This application will build and enhance the concepts learned in the previous chapter.

In this chapter, you will learn how to:

  • Work with lists using observable arrays
  • Bind input elements such as text fields and dropdown to our model
  • Use the foreach flow control with templating to render a table
  • Control text using the text data binding
  • Control appearance using the css data binding
  • Use visible binding to show or hide components
  • Sort the list using the sort method of the observable arrays
  • Filter the list using the arrayFilter method of the ko.utils package
  • Use computed observables to display dynamically changing data

The to-do list application allows the user to create and manage tasks. The application has the following features:

  • Add and view tasks
  • Delete a task
  • Complete a task
  • Set a priority for my tasks
  • View the tasks sorted by priority and name
  • View the number of total and completed tasks

As mentioned in the previous chapter, we will be taking an iterative approach to building the applications in this book. We will iteratively develop each feature listed earlier until the application evolves into a fully featured one. Each feature will have a corresponding checkpoint folder in the accompanying code. The folders are named as chapter2\checkpoint1, chapter2\checkpoint2, and so on.

主站蜘蛛池模板: 建瓯市| 天祝| 乐山市| 南开区| 汶上县| 云安县| 葵青区| 镇沅| 烟台市| 深州市| 巴彦淖尔市| 临潭县| 依安县| 广元市| 神木县| 浮山县| 永德县| 宝山区| 多伦县| 元江| 昆明市| 治县。| 莆田市| 安平县| 邢台县| 兴义市| 临夏市| 精河县| 星子县| 泌阳县| 余江县| 穆棱市| 汾阳市| 留坝县| 镇坪县| 双牌县| 延川县| 沙坪坝区| 乌兰察布市| 芜湖市| 贵州省|