diff --git a/nativescript-angular/directives/tab-view.ts b/nativescript-angular/directives/tab-view.ts index a945531f9..dcec81529 100644 --- a/nativescript-angular/directives/tab-view.ts +++ b/nativescript-angular/directives/tab-view.ts @@ -8,6 +8,7 @@ import { ViewContainerRef, } from "@angular/core"; import { TabView, TabViewItem } from "tns-core-modules/ui/tab-view"; +import { TextTransform } from "tns-core-modules/ui/text-base"; import { InvisibleNode } from "../element-registry"; import { rendererLog } from "../trace"; @@ -53,6 +54,7 @@ export class TabViewItemDirective implements OnInit { private item: TabViewItem; private _title: string; private _iconSource: string; + private _textTransform: TextTransform; constructor( private owner: TabViewDirective, @@ -89,6 +91,20 @@ export class TabViewItemDirective implements OnInit { } } + + @Input() + get textTransform() { + return this._textTransform; + } + + set textTransform(value: TextTransform) { + if (this._textTransform !== value) { + this._textTransform = value; + this.ensureItem(); + this.item.textTransform = this._textTransform; + } + } + private ensureItem() { if (!this.item) { this.item = new TabViewItem(); @@ -100,6 +116,7 @@ export class TabViewItemDirective implements OnInit { if (this.config) { this.item.title = this._title || this.config.title; this.item.iconSource = this._iconSource || this.config.iconSource; + this.item.textTransform = this._textTransform || this.config.textTransform; } const viewRef = this.viewContainer.createEmbeddedView(this.templateRef);