[英]Ember checkbox click, change event not firing, gives error
I have problem during use of checkbox in ember. 我在使用余烬中的复选框时遇到问题。 I have used one boolean property for checked binding. 我使用了一个布尔属性来进行检查绑定。 Now i want to fire a event on change of this property or click on checkbox, but when i clicks it doesn't fires any of the event. 现在,我想在更改此属性时触发事件,或者单击复选框,但是当我单击它时,不会触发任何事件。 Even it doesn't calls observer function on change of that property. 即使它不更改该属性也调用观察者函数。 below is the my code snippet, 以下是我的代码段,
in View- observer on "setAsRecurringAction" checked property or this can be a click event handler. 在View-observer中的“ setAsRecurringAction”选中属性上,否则可以是单击事件处理程序。
setActionSchedule: function() {
if (this.get('setAsRecurringAction')) {
$(".response-container").css({height: '38em'});
} else {
$(".response-container").css({height: '19em'});
}
}.observes('setAsRecurringAction')
template- 模板-
{{view Ember.Checkbox
checkedBinding="setAsRecurringAction"
class="set-recurring"}}
and same code with action helper also didn't work, 并且带有动作帮助器的相同代码也无法正常工作,
{{view Ember.Checkbox
checkedBinding="setAsRecurringAction"
class="set-recurring"
action="setActionSchedule"}}
thnx in advance. 提前thnx。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.