How to create a tabview that keeps the views inside separated components


#1

hello everybody,

i’m learning tabviews and i can’t get them the way i want. Let’s say that i start from the basic example:

<TabView>
<StackLayout *tabItem="{title: 'Profile', iconSource: '~/icon.png'}" >
    <ListView [items]="items">
        <template let-item="item">
            <Label [text]="item.itemDesc"></Label>
        </template>
    </ListView>
</StackLayout>
<StackLayout *tabItem="{title: 'Stats'}">
    <Label text="Second tab item"></Label>
</StackLayout>
<StackLayout *tabItem="{title: 'Settings'}">
    <Label text="Third tab item"></Label>
</StackLayout>

now i’d like to keep every tabitem inside a different component, with its own logic, how do i do this? I can’t help myself with routers, i need a very simple example. Thanks in advance.


#2

I think you need this example from @jen.looper