In a Auralia 1 application I have a component/class that has this piece of code in it:
I’m trying to port this class to Aurelia 2 beta 18 and have tried the following:
When attached()
gets called the following code is executed:
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