<ListView items="{{ menu }}" row="1" itemTap="listViewItemTap" >
<ListView.itemTemplate>
<GridLayout columns="auto, *">
{%raw%}<Image src="{{ imageURL }}" row="0" cssClass="icon"/>{%endraw%}
<StackLayout col="1">
<Label text="{{ title || 'Downloading...'}}" cssClass="name"/>
<Label text="{{ subtitle }}" cssClass="location"/>
</StackLayout>
</GridLayout>
</ListView.itemTemplate>
</ListView>
I have this xml file, I want to get a list with a image and a title and subtitle.
in the javascript I have
for (var i = 0; i < list.length; i++)
{
menu.push({
imageURL : images.imageURL(list[i].icon),
title: list[i].menu,
subtitle: list[i].desc
})
}
where imageURL is:
imageSource.fromUrl(server.address + '/' + path)
.then(function (res) {
console.log("Image successfully loaded");
return res;
}, function (error) {
console.log("Error loading image: " + error);
});
But I can't see the image, I try all, change in the xml the 'src' to 'url' or to 'source' and nothing.
what I did wrong, can anyone help me?