Angular2 + Html 如果我在文本框中输入字符 "A" 如何编写代码,它会显示 A Enter

Angular2 + Html how to write code to if i enter character "A" in textbox it shows me A Enter

这里我有要求,如果我在文本框中输入任何字符,它应该在 Alter 中显示我

  <input type="text" ()="Somevale("$event.target.vale")"/> //()=>what i mention
    Somevalue(value){
    alert(value)
    }

使用每次按键输入都会引发的 Input 事件

<input type="text" (input)="Test(text.value)" #text>     

Test(name:any)
{
 alert(name);
}