# Advice needed wrt bindables Aurelia 2 beta 18

**URL:** <https://discourse.aurelia.io/t/advice-needed-wrt-bindables-aurelia-2-beta-18/5460>\
**Category:** Help Requests\
**Created:** [June 14, 2024, 1:06pm UTC](https://discourse.aurelia.io/t/advice-needed-wrt-bindables-aurelia-2-beta-18/5460 "2024-06-14T13:06:44Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![norgie](https://avatars.discourse-cdn.com/v4/letter/n/57b2e6/32.png) [@norgie](https://discourse.aurelia.io/u/norgie)\
**Post date:** [June 14, 2024, 1:06pm UTC](https://discourse.aurelia.io/t/advice-needed-wrt-bindables-aurelia-2-beta-18/5460/1 "2024-06-14T13:06:44Z")

</div>

In a Auralia 1 application I have a component/class that has this piece of code in it:

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

I’m trying to port this class to Aurelia 2 beta 18 and have tried the following:

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

When `attached()` gets called the following code is executed:

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

In Aurealia 1 this works just fine. In my version for Aurelia 2 the last statement throws an exception because `this.navitems[0]` apparently is `undefined` (or maybe it was null. Can’t remember).

Can anyone point me in the right direction so I can get this to work?

TIA
