在 Ember 2 中,我正在尝试做可能是最简单的事情。当我将事件绑定到输入元素时,我希望将事件参数传递给我的动作处理程序,但我无法得到它。只需检查keyCode 13,它是键盘上的“输入”键。
{{input type=text
value=model.filters.query
placeholder="Search by title"
action="search" onEvent="key-press"
}}
我的函数处理程序是:
search(newValue){
// I am only getting newValue and not the event object
}