Reputation: 247
How to change text color on menu bar when using Label
Nativescript.
My code:
<StackLayout row="1" orientation="horizontal" backgroundColor="#eae8e8" class="foot">
<Label width="25%" textAlignment="left" [nsRouterLink]="['/photos']">
<FormattedString>
<Span text="Photos"></Span>
</FormattedString>
</Label>
<Label width="25%" textAlignment="left" [nsRouterLink]="['/albums']">
<FormattedString>
<Span text="Albums"></Span>
</FormattedString>
</Label>
</StackLayout>
Upvotes: 0
Views: 593
Reputation: 1530
you can use color
attribute both in CSS and direct HTML to specify the color to the element.
for example:
zontal" backgroundColor="#eae8e8" class="foot">
<Label width="25%" textAlignment="left" [nsRouterLink]="['/photos']">
<FormattedString>
<Span color="blue" text="Photos"></Span>
</FormattedString>
</Label>
<Label width="25%" textAlignment="left" [nsRouterLink]="['/albums']">
<FormattedString>
<Span text="Albums"></Span>
</FormattedString>
</Label>
</StackLayout>
here is playground demo:https://play.nativescript.org/?template=play-ng&id=gMhuwo&v=2
Upvotes: 1