(click)="handleClick(i)">{{ name }}</li>我想要在用户单击一个项目时更改它的CSS类。我尝试使用MouseEvent的属性,比如target和currentTarget,但是EventTarget不提供对类列表的访问。因此,我尝试获取列表元素作为视图子元素:
@ViewChildren("nameitem
我在我的角度应用程序中创建了一个简单的自定义input组件--使用ControlValueAccessor。因此,当我想创建一个表单input元素时,我不需要调用<input />,只需要调用<my-input>。<input type="text" class="form-control" form