# Binding a property between two componets

**URL:** https://discourse.aurelia.io/t/binding-a-property-between-two-componets/2715
**Category:** Help Requests
**Created:** [July 4, 2019, 8:24am UTC](https://discourse.aurelia.io/t/binding-a-property-between-two-componets/2715 "2019-07-04T08:24:41Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![AndreaProgrammerIt](https://avatars.discourse-cdn.com/v4/letter/a/e9a140/32.png) [@AndreaProgrammerIt](https://discourse.aurelia.io/u/AndreaProgrammerIt)
#### Post date: [July 4, 2019, 8:24am UTC](https://discourse.aurelia.io/t/binding-a-property-between-two-componets/2715/1 "2019-07-04T08:24:41Z")

</div>

Hi all,

i’m writing a page made with two components:  
a page display a list of areas.

 ![image](https://canada1.discourse-cdn.com/flex027/uploads/aurelia/original/2X/6/6d481a1443cbb1c03c7b7cbdaa60e532447eb21b.png)

1)area-loader: it’s a container that loads “areas”  
2)area-component: it’s the component that show the single area.

The problem is that “areaSelected” property of area-component it’s not updated every time that the user select an area in the list so I can’t do my things.

 ![image](https://canada1.discourse-cdn.com/flex027/uploads/aurelia/original/2X/9/963bcfb8d612508607c55bcace34bac13ecc8420.png)

I tryied to put “@observable” o “@bindable” or some other properties but i can’t find a good way to work.

The simplest solution is to not use the “area-component” but I put the code all togheter… this works but I don’t like.

I created this but I have also a compile error =(

> **[https://discourse.aurelia.io/t/custum-element-binding-repeat/2220 - CodeSandbox](https://codesandbox.io/s/httpsdiscourseaureliaiotcustum-element-binding-repeat2220-7oskl)**
>
> A basic template for Aurelia without bundler / compiler

---

<div class="post-metadata">

### Author: ![bigopon](https://yyz1.discourse-cdn.com/flex027/user_avatar/discourse.aurelia.io/bigopon/32/18_2.png) [@bigopon](https://discourse.aurelia.io/u/bigopon)
#### Post date: [July 4, 2019, 12:32pm UTC](https://discourse.aurelia.io/t/binding-a-property-between-two-componets/2715/2 "2019-07-04T12:32:57Z")

</div>

I noticed a few mistakes, but the most obvious one would be using TypeScript on Aurelia Script template. Aurelia script template is supposed to support normal, plain JavaScript only. If you wanna use TypeScript, here is an example, with the components you created [https://codesandbox.io/s/aurelia-typescript-sandbox-459pc](https://codesandbox.io/s/aurelia-typescript-sandbox-459pc)

Note that in your sandbox, you created components without `-` in their names, such as `arealoader` instead of `area-loader`, it will cause issues so I fixed that.
