Forum Discussion
admhemed
8 years agoFrequent Visitor
load an html template into custom visual
how to import html-content.html into my code?
in my constructor I write
$.get('/src/html-content.html', function(data) {
console.log(data);
});
which results into an xhr to https://app.powerbi.com/src/html-content.html
thanks
3 Replies
- v-chuncz-msftCommunity Support
- admhemedFrequent Visitor
thanks,
I thought of this. This helps in dividing the code, but if html is wrapped in javascript, webstorm considers it as a string, even when in back-ticks (` `).
- v-viigCommunity Champion
As an alternative, you might try to use webpack or gulp to preprocess the code but this is out of scope of PBIVIZ tools.
Ignat Vilesov,
Software Engineer
Microsoft Power BI Custom Visuals