From dcc3bf1205f387cdc71ef5ce51e61dc415f549b3 Mon Sep 17 00:00:00 2001 From: eddyystop Date: Thu, 29 May 2014 18:27:05 -0400 Subject: [PATCH] Made some corrections to docs. --- docs/getting-started.md | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/docs/getting-started.md b/docs/getting-started.md index 4a9bfc85..1a9094e2 100644 --- a/docs/getting-started.md +++ b/docs/getting-started.md @@ -217,9 +217,9 @@ This binds the `description` getter-setter to the text input. Updating the value ```javascript var ctrl = new todo.controller(); ctrl.description(); // empty string -m.render(todo.view(ctrl)); // input is empty +m.render(document, todo.view(ctrl)); // input is empty ctrl.description("Write code"); //set the description in the controller -m.render(todo.view(ctrl)); // input now says "Write code" +m.render(document, todo.view(ctrl)); // input now says "Write code" ``` Note that calling the `todo.view` method multiple times does not re-render the entire template. @@ -354,9 +354,7 @@ Here are the highlights of the template above: - The template is rendered as a child of the implicit `` element of the document. - The text input saves its value to the `ctrl.description` getter-setter we defined earlier. -- The button calls the `ctrl.add` method when clicked. The `.bind(ctrl, ctrl.description)` idiom is a [partial application](http://en.wikipedia.org/wiki/Partial_application). - - In this example, it's only used to maintain the scope binding for the `this` parameter in the controller method, but typically it's also used to bind parameters to the function without the need to declare a wrapper anonymous function. +- The button calls the `ctrl.add` method when clicked. - The table lists all the existing to-dos, if any. - The checkboxes save their value to the `task.done` getter setter. - The description gets crossed out via CSS if the task is marked as done.