This lesson shows you how set listen for click events using the (click) syntax. It also covers getting values off of an input using the #ref syntax then passing that value into the onClick event handler.
how does this all typescript compile in the browser work? magic ? its pretty awesome none the less
It is using system.js and typescript.js to compile on the fly. It is nice, but you also lose a huge benefit from TypeScript compilation and it makes finding errors a real chore. Silent failures.
Nice way to drop in and start doing stuff though!
I'm unable to make the refs work and can't find any supporting documentation on angular 2's site. Can you provide a link? Also, I'm not using TypeScript, but again couldn't find the "#" reference documentation.
I wouldn't use Angular 2 without TS personally. Sounds awful 😨
That said, "refs" are referred to as "local template variables"
this article has a good section on them.
Impossible to say what is going on with your local code