I have a bunch of list items and would like to highlight each one once it\'s clicked. This is easy for me to do in jQuery or even JavaScript but I\'m lost when it comes to Angul
It May help you
export class ContactComponent implements OnInit { values:Object[]; ngOnInit() { this.values=[{name:'Alex',done:false},{name:'Jon',done:false}]; } completed(i:number){ if(this.values[i]) this.values[i]['done']=!this.values[i]['done']; } }
HTML:
{{v.name}}×