Tabview component doesn't work as it should in nativescript-angular

24 Views Asked by At

i'm coding my application in nativescript-angular and I need to use a tabview component for navigating between pages .

I saw the nativescript's site example :

<TabView>
    <TabViewItem title="First">
        <Label text="First Tab Content" textAlignment="center" verticalAlignment="center"></Label>
    </TabViewItem>
    <TabViewItem title="Second">
        <Label text="Second Tab Content" textAlignment="center" verticalAlignment="center"></Label>
    </TabViewItem>
    <TabViewItem title="Third">
        <Label text="Third Tab Content" textAlignment="center" verticalAlignment="center"></Label>
    </TabViewItem>
</TabView>

It doesen't work for me Screenshot1

The only thing that work is this:

`

<GridLayout *tabItem="{ title: 'Title1' }">
    <dashboard></dashboard>
</GridLayout>

<GridLayout *tabItem="{ title: 'Title 2' }">
</GridLayout>

<GridLayout *tabItem="{ title: 'Title 3' }">
    
</GridLayout>

<GridLayout *tabItem="{ title: 'Title 4' }">
   
</GridLayout>

`

Screenshot 2

But there is a problem: i'm not able to go back to the dashboard component when i click the label Title 1.

In the dashboard component there is a

0

There are 0 best solutions below