webix jet image load into template

edited July 2019 in Technical questions

Hello. I am have dataview widgate wth template like :"\n""< img src='#name#.png'>";
i try use image-webpack-loader but don`t understand, how i can import img from javascript object?



  • edited July 2019

    Hey @Dr10s, while you can do something like this to show your image in the template: https://snippet.webix.com/ozivjf3r, I strongly recommend you do it like this instead: https://snippet.webix.com/vkdoii1h. In the template you get access to the object you've parsed into it, so then you can simply refer to the appropriate object properties for the values you need to show in your template. In this example, I've included an img property inside an object containing a link to the image (this will work with local images as well, naturally).

  • P.S. You can do the same with the dataview: https://snippet.webix.com/0akw8vdk simply use parse instead of setValues.

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion