HTML and CSS Reference
In-Depth Information
user has no task items to display in the to-do list. This can occur in two situations: when
no task items exist in the database and when a search of the task list yields no matches. In
order to handle these cases, createEmptyItem will create an “empty item,” actually a
message that says either “No tasks to display. Add one?” or “No tasks match your query.”
Add the following code to your application, just after the code from the previous listing.
Listing 5.11. app.js—Generating the markup for task items
 
Search WWH ::




Custom Search