We are trying to pass inputs to an angular web component. To make system robust, from api we will get two values
- Script URL
- Selector name ( below example
componentwe are getting from db as well )
So we are able to add script dynamically and then added selector name by using createElement of renderer2. But now we are stuck as we want to pass inputs to that component like
<component [data]="'Hello'"></component>
so question is how we can add angular input tags in element which is added in DOM by using
renderer.createElement
Is it possible to pass or should change logic to add element ?
Main point is both javascript location and selector is dynamic.
Thanks in advance
setAttribute/setPropertymethods: angular.io/api/core/Renderer2