Given
@targets filters: HTMLElement[]
@target allFilter: HTMLElement
Currently this is the markup
<div data-target="foo-controller.filters foo-controller.allFilter"></div>
I propose that we add data-targets, like so:
<div data-targets="foo-controller.filters" data-target="foo-controller.allFilter"></div>
In this case we see from the markup that this is supposed to be the only one allFilter, but there should be multiple filters.
I think data-targets will
- Match with the decorator thus make it clearer that to find a collection you need
@targets in TS.
- Provide better context when looking at the markup. When refactoring unfamiliar, JS we often have to check "is this thing rendered more than one time?"
Given
Currently this is the markup
I propose that we add
data-targets, like so:In this case we see from the markup that this is supposed to be the only one
allFilter, but there should be multiplefilters.I think
data-targetswill@targetsin TS.