我创建了一个plunkr解释什么即时通讯谈论 https://plnkr.co/edit/42Gcd8jayIO3EReiKCLf?p=preview在角4如何失去焦点KEYUP
//our root app component
import {Component, NgModule, VERSION} from '@angular/core'
import {BrowserModule} from '@angular/platform-browser'
@Component({
selector: 'my-app',
template: `
<div>
<input (keyup.enter)=func() >
</div>
`,
})
export class App {
name:string;
constructor() {
}
func(){
console.log("lose focus here")
}
}
@NgModule({
imports: [ BrowserModule ],
declarations: [ App ],
bootstrap: [ App ]
})
export class AppModule {}
我不想失去焦点输入框上KEYUP