# Binding checkboxes with matcher

**URL:** <https://discourse.aurelia.io/t/binding-checkboxes-with-matcher/4286>\
**Category:** Help Requests\
**Created:** [June 30, 2021, 10:09am UTC](https://discourse.aurelia.io/t/binding-checkboxes-with-matcher/4286 "2021-06-30T10:09:50Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![reinholdk](https://avatars.discourse-cdn.com/v4/letter/r/73ab20/32.png) [@reinholdk](https://discourse.aurelia.io/u/reinholdk)\
**Post date:** [June 30, 2021, 10:09am UTC](https://discourse.aurelia.io/t/binding-checkboxes-with-matcher/4286/1 "2021-06-30T10:09:50Z")

</div>

Hi,

I’m trying to implement the checkbox example from:  
[https://aurelia.io/#array-of-objects-with-matcher](https://aurelia.io/#array-of-objects-with-matcher)  
but wanted to put checkbox inside a repeat. This seems to work only by adding an additional `matcher.bin` on the element that carries the repeat.for. Is that intended.  
Sample can be found here:

> **[Object Matcher (forked) - CodeSandbox](https://codesandbox.io/s/object-matcher-forked-877or?file=%2Fsrc%2Fapp.html)**
>
> An Aurelia demo showing how to bind checkboxes to objects, using a matcher function.

Thanks!

---

<div class="post-metadata">

**Author:** ![dwaynecharrington](https://yyz1.discourse-cdn.com/flex027/user_avatar/discourse.aurelia.io/dwaynecharrington/32/11_2.png) [@dwaynecharrington](https://discourse.aurelia.io/u/dwaynecharrington)\
**Post date:** [June 30, 2021, 10:41pm UTC](https://discourse.aurelia.io/t/binding-checkboxes-with-matcher/4286/2 "2021-06-30T22:41:53Z")

</div>

@reinholdk Okay, so you’ve encountered a bug that was fixed a very long time ago and sadly, not documented. I have forked your sandbox and applied the `useInnerMatcher` fix inside of `main.ts` for you.

By disabling the inner matcher, you tell the repeater not to look to the template context inside of the repeater for your matcher.

> **[Object Matcher (forked) - CodeSandbox](https://codesandbox.io/s/object-matcher-forked-f3mmk?file=%2Fsrc%2Fmain.ts)**
>
> An Aurelia demo showing how to bind checkboxes to objects, using a matcher function.

The reason this is not false by default is for backwards compatibility reasons (I believe). In Aurelia 2 this issue won’t be present.

---

<div class="post-metadata">

**Author:** ![reinholdk](https://avatars.discourse-cdn.com/v4/letter/r/73ab20/32.png) [@reinholdk](https://discourse.aurelia.io/u/reinholdk)\
**Post date:** [July 1, 2021, 7:40am UTC](https://discourse.aurelia.io/t/binding-checkboxes-with-matcher/4286/3 "2021-07-01T07:40:40Z")

</div>

@dwaynecharrington thanks! Have found the corresponding issue here: [matcher.bind does not work inside of repeat with checkboxes · Issue #388 · aurelia/templating-resources · GitHub](https://github.com/aurelia/templating-resources/issues/388)
