I am trying to build a little app with Angular2. I want to use local variables, like it is explained here:
https://angular.io/docs/ts/latest/guide/user-input.html
<input #myname (keyup)>
<p>{{myname.value}}</p>
But it doesn't work as expected. If i press a key on the focused input field, the text in the p-tag should be updated. But all i get is an Exception:
EXCEPTION: TypeError: rec[(rec.length - 1)] is undefined
If i do something like this it will work, even if the foo method exists or not:
<input #myname (keyup)="foo()">
<p>{{myname.value}}</p>
I followed exactly the instructions on the page and i don't have any custom code.