Is it possible to display images in a column within an ng smart table? We have several columns consisting mostly of data, with one column dedicated to displaying images. Following the ng smart table concept, I attempted to implement the code below which currently only shows a URL instead of the actual image.
https://i.stack.imgur.com/I3K1c.png
home.component.html
<ng2-smart-table [settings]="settings" [source]="notifications"></ng2-smart-table>
home.component.ts
import { myListDB } from "../../../shared/tables/myList";
export class MyBookingsComponent implements OnInit {
public pageTitle = "My Home Page";
public notifications = [];
constructor() {
this.notifications = myListDB.data;
}
public settings = {
editable:false,
actions: {
position: 'right',
add: false,
edit: false,
delete: false
},
columns: {
no: {
title: 'No'
},
brandlogo: {
title: 'Brand Logo',
},
brand: {
title: 'Brand'
},
title: {
title: 'Campaign Name'
}
},
};
ngOnInit(){
}
}
myList.ts
export class myListDB {
static data = [
{
no: 1,
brandlogo: "assets/images/brands/brand1.jpg",
brand: "ABC Company",
title: "XYZ Campaign"
}
]
}