How can I conditionally add an element attribute eg the checked
of a checkbox?
(我如何能有条件地添加元素属性,例如checked
复选框的?)
Previous versions of Angular had NgAttr
and I think NgChecked
which all seem to provide the functionality that I'm after.
(以前的Angular版本具有NgAttr
,我认为NgChecked
似乎都提供了我所追求的功能。)
However, these attributes do not appear to exist in Angular 2 and I see no other way of providing this functionality.(但是,这些属性在Angular 2中似乎不存在,我看不到提供此功能的其他方法。)
ask by Jonathan Miles translate from so
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…