These are chat archives for angular/material

6th
Jul 2017
Dennis Belany
@azarus
Jul 06 2017 06:38
css
@Babyswizz_twitter
Manie Coetzee
@ramkat99
Jul 06 2017 17:29
@christiaan-lombard - shot, thx for the heads up :)
jibbers42
@jibbers42
Jul 06 2017 21:07
How can I call toggleSelected() on a chip on click? I'm not sure how to get a reference to the chip from the click event. (material2)
jibbers42
@jibbers42
Jul 06 2017 21:50
I ended up with:
@ViewChildren(MdChip) chips: QueryList<MdChip>;
  ngAfterViewInit() {
    this.chips.forEach(chip =>
      this.renderer.listen(chip._elementRef.nativeElement,
                           'click',
                           _ => { chip.toggleSelected() }));
  }