User Input

Get user input from a template reference variable
There's another way to get the user data without the $event variable.
Angular has a syntax feature called template reference variables. These variables grant us direct access to an element. We declare a template reference variable by preceding an identifier with a hash/pound character (#).
Here's an example of using a template reference variable to implement a clever keystroke[['kiːstrəʊk]] n. 击键;按键 loopback n. [计] 回送;回路 in an ultra-simple 超简单的template.

你可能感兴趣的:(User Input)