When I pass font-awesome unicode dinamically, Nativescript don’t show the icon.
my-section.component.ts file:
public items = [
{
title : "Calendar",
icon: ""
},
{
title : "Map",
icon: "",
}
....
];
my-section.component.html file:
<StackLayout orientation="vertical">
<ListView [items]="items">
<ng-template let-item="item">
<Label [text]="item.icon" class="font-awesome"></Label>
</ng-template>
</ListView>
</StackLayout>
WRONG RESULT:

If I try hardcoding the unicode value:
<StackLayout orientation="vertical">
<ListView [items]="sections">
<ng-template let-item="item">
<Label text="" class="font-awesome"></Label>
</ng-template>
</ListView>
</StackLayout>
… the result is correct:

@ParVisual create a string from char value for code behind as shown in the documentation article here
For example
String.fromCharCode(0xe903).
Let me know if this has resolved the issue.
Thank you @NickIliev, that solved the problem.
My array provider now look like this:
public items = [
{
title : "Calendar",
icon: String.fromCharCode(0xf073)
},
{
title : "Map",
icon: String.fromCharCode(0xf041),
}
....
];
Most helpful comment
@ParVisual create a string from char value for code behind as shown in the documentation article here
For example
Let me know if this has resolved the issue.