Nativescript Angular BottomNavigation selectedIndex binding not working

Viewed 298

My BottomNavigation with selectedIndex binding is not working when loaded, content is not being displayed but the navigation bar is there. If i insert the index normally then it would work. Could anyone advice me on this? Thanks

HTML :

<BottomNavigation [selectedIndex]="tabIndex">  <-- Not Working this way
<BottomNavigation selectedIndex="1"> <-- Works fine

TS :

export class MainComponent implements OnInit {

tabIndex: number = 2;

Here is the Playground sample

0 Answers
Related