I am getting fraction part of HTML code from api, want to render into DOM like below...
// getting template from backend.
let template1 = "<div class='well'><formio src='example/text.json'></formio>"; //appearing into dom, but not loading form.
// second way
let template2 = "<formio [src]='getUrl()'></formio></div>";
// calling getUrl from component.ts file.
// attaching template into DOM using appendChild() method..
const fragment = document.createRange().createContextualFragment(template);
document.getElementById('landingTemplate').appendChild(fragment);
getUrl() {
return 'example/text.json';
}
// getUrl() not calling from HTML.
<div id="landingTemplate"></div>
so unable to render formio. Anyone have idea please help me.