【发布时间】:2019-01-24 19:09:15
【问题描述】:
我有一个输入,我想获取它当前得到的文本并将其发送到一个方法。
代码如下:
app.component.html
<input type="text" (keyup.enter)="sendit()" />
app.component.ts
sendit() {
console.log(The text in the input);
}
我该怎么做?
【问题讨论】:
标签: angular typescript