From 8d2a2a9dc3ae998ca71eac01a6a635660476867b Mon Sep 17 00:00:00 2001 From: Bhavin Jalodara Date: Wed, 2 May 2018 18:12:00 +0530 Subject: [PATCH 1/2] textTransform property to TabViewItemDirective textTransform property added to TabViewItemDirective so that in angular tabItem textTransformation can be changed. --- nativescript-angular/directives/tab-view.ts | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/nativescript-angular/directives/tab-view.ts b/nativescript-angular/directives/tab-view.ts index a945531f9..6f697eaaa 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, @@ -88,6 +90,20 @@ export class TabViewItemDirective implements OnInit { this.item.iconSource = this._iconSource; } } + + + @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) { @@ -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); From b833445d61e76ca32a6efc0504c28ca51debad79 Mon Sep 17 00:00:00 2001 From: Bhavin Jalodara Date: Mon, 7 May 2018 15:44:19 +0530 Subject: [PATCH 2/2] removed tailing whitespace removed tailing whitespace which was causing build failed. --- nativescript-angular/directives/tab-view.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nativescript-angular/directives/tab-view.ts b/nativescript-angular/directives/tab-view.ts index 6f697eaaa..dcec81529 100644 --- a/nativescript-angular/directives/tab-view.ts +++ b/nativescript-angular/directives/tab-view.ts @@ -90,8 +90,8 @@ export class TabViewItemDirective implements OnInit { this.item.iconSource = this._iconSource; } } - - + + @Input() get textTransform() { return this._textTransform;