0
我搜索的选项包括从母体侧的子组件的HTML标记,如角2:嵌套子组件灵活
父组件:
<child><button>+</button></child>
子组件:
<form>
<input />
<!-- insert button here -->
</form>
我知道这是可能的反应,但我怎么能在Angular 2中做到这一点?
我搜索的选项包括从母体侧的子组件的HTML标记,如角2:嵌套子组件灵活
父组件:
<child><button>+</button></child>
子组件:
<form>
<input />
<!-- insert button here -->
</form>
我知道这是可能的反应,但我怎么能在Angular 2中做到这一点?
检查出Plunker工作演示中,我提出:
{{HERE}}
我简单地使用@Input
装饰这个简单的一块HTML <b>This bold html text is coming from the parent</b>
作为字符串发送,然后我使用呈现的HTML具有属性绑定的[innerHTML]
属性。