Regarding: https://angular.io/docs/js/latest/guide/user-input.html
The directions have us create a doneTyping method on our controller like so:
doneTyping($event) {
if($event.which === 13) {
this.addTodo($event.target.value);
$event.target.value = null;
}
}
if so, then shouldn't the Template in the finished code example make use of
it somehow, for example:
<input #todotext (keyup)="doneTyping($event)">
currently the finished code only shows:
<input #todotext>
<button (click)="addTodo(todotext.value)">Add ToDo</button>
In the example nothing ever calls doneTyping. This also misses out on
explaining how doneTyping could be called on keyup event and what $event is.
--
You received this message because you are subscribed to the Google Groups
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.