Using @computedFrom array in repeater

Viewed 35

Is this possible? Can't seem to get it to work. Trying to dynamically generate an array using computed from and displaying entries using a repeater.

@computedFrom('myArray')
  get onlyOneType() {
    let images =  this.myArray.filter((entry) => entry.type === 'a');
    return images;
  }
<div repeat.for="item of onlyOneType">
  $item.type}
</div>
0 Answers
Related