哪些是在Angular2(KEYUP)的选项? [英] What are the options for (keyup) in Angular2?
本文介绍了哪些是在Angular2(KEYUP)的选项?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
下面的伟大工程的输入键被释放时。 什么其他选项可用于 KEYUP
除了 keyup.enter
?
<输入#inputstring(keyup.enter)=DoSomething的(inputstring.value)/>
解决方案
这是目前在测试中记录的选项键:ctrl,班次,进入和逃离。这些键绑定的一些有效的例子:
keydown.control.shift.enter
keydown.control.esc
您可以跟踪这个<一个href=\"https://github.com/angular/angular/blob/c7572ac1f9bbda59ba301dd330e6f64faf91b9e1/modules/angular2/test/render/dom/events/key_events_spec.ts\">here虽然没有官方的文档存在,但他们应该很快出来了。
The following works great when the enter key is released. What other options are available for the keyup
in addition to keyup.enter
?
<input #inputstring (keyup.enter)="doSomething(inputstring.value)"/>
解决方案
These are the options currently documented in the tests: ctrl, shift, enter and escape. These are some valid examples of key bindings:
keydown.control.shift.enter
keydown.control.esc
You can track this here while no official docs exist, but they should be out soon.
这篇关于哪些是在Angular2(KEYUP)的选项?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文