anchor.diff:  .l-main-section
     h2#section-final-code Final Code
   
  -  pre.prettyprint.lang-javascript
  -    code.
  -      //ES5
  -      function TodoList() {
  -        this.todos = ["Eat Breakfast", "Walk Dog", "Breathe"];
  -
  -        this.addTodo = function(todo) {
  -          this.todos.push(todo);
  -        };
  -
  -        this.doneTyping = function($event) {
  -          if($event.which === 13) {
  -            this.addTodo($event.target.value);
  -            $event.target.value = null;
  -          }
  -        }
  -      }
  -
  -      TodoList.annotations = [
  -        new angular.Component({
  -          selector: "todo-list"
  -        }),
  -        new angular.View({
  -          template:
  -            '&lt;ul&gt;' +
  -            '&lt;li *for="#todo of todos">' +
  -            '{{ todo }}' +
  -            '&lt;/li&gt;' +
  -            '&lt;/ul&gt;' +
  -            '&lt;input #textbox (keyup)="doneTyping($event)">' +
  -            '&lt;button (click)="addTodo(textbox.value)"&gt;Add Todo&lt;/button&gt;',
  -          directives: [angular.For, angular.If]
  +  .code-box
  +    pre.prettyprint.lang-javascript(data-name="es5")
  +      code.
  +        //ES5
  +        function TodoList() {
  +          this.todos = ["Eat Breakfast", "Walk Dog", "Breathe"];
  +
  +          this.addTodo = function(todo) {
  +            this.todos.push(todo);
  +          };
  +
  +          this.doneTyping = function($event) {
  +            if($event.which === 13) {
  +              this.addTodo($event.target.value);
  +              $event.target.value = null;
  +            }
  +          }
  +        }
  +
  +        TodoList.annotations = [
  +          new angular.Component({
  +            selector: "todo-list"
  +          }),
  +          new angular.View({
  +            template:
  +              '&lt;ul&gt;' +
  +              '&lt;li *for="#todo of todos">' +
  +              '{{ todo }}' +
  +              '&lt;/li&gt;' +
  +              '&lt;/ul&gt;' +
  +              '&lt;input #textbox (keyup)="doneTyping($event)">' +
  +              '&lt;button (click)="addTodo(textbox.value)"&gt;Add Todo&lt;/button&gt;',
  +            directives: [angular.For, angular.If]
  +          })
  +        ];
  +
  +        document.addEventListener("DOMContentLoaded", function() {
  +          angular.bootstrap(TodoList);
  +        });
  +
  +    pre.prettyprint.lang-typescript(data-name="typescript")
  +      code.
  +        //TypeScript
  +        import {Component, View, bootstrap, For, If} from 'angular2/angular2';
  +
  +        @Component({
  +          selector: 'todo-list'
           })
  -      ];
  -
  -      document.addEventListener("DOMContentLoaded", function() {
  -        angular.bootstrap(TodoList);
  -      });
  -
  -  pre.prettyprint.lang-typescript
  -    code.
  -      //TypeScript
  -      import {Component, View, bootstrap, For, If} from 'angular2/angular2';
  -
  -      @Component({
  -        selector: 'todo-list'
  -      })
  -      @View({
  -        template: `
  -          &lt;ul&gt;
  -            &lt;li *for="#todo of todos"&gt;
  -              {{ todo }}
  -            &lt;/li&gt;
  -          &lt;/ul&gt;
  -
  -          &lt;input #todotext (keyup)="doneTyping($event)"&gt;
  -          &lt;button (click)="addTodo(todotext.value)"&gt;Add Todo&lt;/button&gt;
  -                `,
  -        directives: [For, If]
  -      })
  -      class TodoList {
  -        todos: Array<string>;
  -
  -        constructor() {
  -          this.todos = ["Eat Breakfast", "Walk Dog", "Breathe"];
  -        }
  -
  -        addTodo(todo: string) {
  -          this.todos.push(todo);
  -        }
  -
  -        doneTyping($event) {
  -          if($event.which === 13) {
  -            this.addTodo($event.target.value);
  -            $event.target.value = null;
  -          }
  -        }
  -      }
  -
  -      bootstrap(TodoList);
  +        @View({
  +          template: `
  +            &lt;ul&gt;
  +              &lt;li *for="#todo of todos"&gt;
  +                {{ todo }}
  +              &lt;/li&gt;
  +            &lt;/ul&gt;
  +
  +            &lt;input #todotext (keyup)="doneTyping($event)"&gt;
  +            &lt;button (click)="addTodo(todotext.value)"&gt;Add Todo&lt;/button&gt;
  +                  `,
  +          directives: [For, If]
  +        })
  +        class TodoList {
  +          todos: Array<string>;
  +
  +          constructor() {
  +            this.todos = ["Eat Breakfast", "Walk Dog", "Breathe"];
  +          }
  +
  +          addTodo(todo: string) {
  +            this.todos.push(todo);
  +          }
  +
  +          doneTyping($event) {
  +            if($event.which === 13) {
  +              this.addTodo($event.target.value);
  +              $event.target.value = null;
  +            }
  +          }
  +        }
  +
  +        bootstrap(TodoList);
  
positive.code:   pre.prettyprint.lang-html
      code.
        &lt;input (keyup)="myControllerMethod()"&gt;
        
    h3#local-variables Local variables
    p.
      As in previous examples, you can make element references available to other parts of the template as a local
  
negative.code:     event.  And the <code>{{myname.value}}</code> binds the text node of the  <code>&lt;p&gt;</code> element to the
      input's value property.
    p Let's do something a little more complex where users enter items and add them to a list like this:
    figure.image-display
        img(src='user-input-example1.png')
  
  
  