February 2015
Intermediate to advanced
170 pages
3h 39m
English
To make our simple task list app a little more interesting, we'll add the ability to nest tasks. In other words, we'll allow some tasks to be subtasks of other tasks. Doing so requires only a slight change to our model, for example adding a ParentId property:
public class Task
{
public string Description { get; set; }
public bool IsComplete { get; set; }
public string ParentId { get; set; }
public bool Type { get { return "task"; } }
}There are numerous ways to set up a user interface to allow parent tasks to be set. In the interest of brevity, we'll assume that our create and edit actions and views have two simple additions:
#get all tasks returned by the #all_incomplete view in the tasks design document tasks = client.query("tasks", ...Read now
Unlock full access