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
似乎都提供了我所追求的功能。)
(但是,这些属性在Angular 2中似乎不存在,我看不到提供此功能的其他方法。)
ask by Jonathan Miles translate from so