NathanWalker / nativescript-ngx-fonticon

Use custom font icon collections seamlessly with NativeScript + Angular.
MIT License
76 stars 39 forks source link

Using on Tab View #29

Open Jonatthu opened 7 years ago

Jonatthu commented 7 years ago

I can not get this to work

<TabView [(ngModel)]="tabSelectedIndex" tabTextColor="red" class="ion">
    <StackLayout class="ion" *tabItem="{title: ('ion-flash' | fonticon) }">
        <Label class="ion" [text]="'ion-flash' | fonticon"></Label>
    </StackLayout>
    <StackLayout *tabItem="{title: 'ion-home' | fonticon}">
        <Label text="Bla bla bla"></Label>
    </StackLayout>
</TabView>

It is not showing any error message. But the line

<Label class="ion" [text]="'ion-flash' | fonticon"> is working fine and displaying the icon.

But

<StackLayout class="ion" *tabItem="{title: ('ion-flash' | fonticon) }"> Is not displaying nothing.

I'm using nativescript 3, with angular and the latest build of this package. Thanks!

Jonatthu commented 7 years ago

Using

    <template tabItem title="{{'ion-home' | fonticon}}">
        <StackLayout>
            <Label text="First tab item"></Label>
        </StackLayout>
    </template>

Inside the tab view works

Jonatthu commented 7 years ago

But I don't know how to add text below the icon and customize the size of the icon and the text separately :/

TinusJ commented 6 years ago

Was this solved?

Have the same issue

 `<StackLayout *tabItem="{title: {'fa-home' | fonticon}}">`