我正在使用网络应用程序。其中玉兰为CMS。我在这里还是新手,但我会解释这种情况。玉兰提供index.html,其中包含组件的引用。但是对于某些组件,它还提供了一些其他html内容。这些额外的内容必须显示在特定组件的模板内。请参阅以下内容以获得更好的理解。(请记住,它在index.html中)
<my-component>
<div> this division has to be shown inside the my component template.</div>
</my-component>
到目前为止,我一直尝试遵循以下方法。
有人可以建议我解决这个问题的方法吗?
您是否尝试过为该组件使用Input()值?
<my-comp [myInputs]="'My Input HTML <b>Content</b>'">
<div [innerHTML]="myInputs"></div>