Aurelia未绑定innerHTML绑定语句
假设我已经使用innerhtml.bind插入了一些html,但是html包含了它自己的aurelia.bind语句,那么如何让aurelia识别这些内部绑定呢 范例Aurelia未绑定innerHTML绑定语句,aurelia,Aurelia,假设我已经使用innerhtml.bind插入了一些html,但是html包含了它自己的aurelia.bind语句,那么如何让aurelia识别这些内部绑定呢 范例 <div innerhtml.bind="myhtml"></div> 在哪里 var myhtml=“一些文本”; 说: 使用innerhtml属性绑定只需设置元素的 innerHTML属性。标记不会通过Aurelia的 模板系统绑定表达式和require元素将不会 接受评估。 创建一个组件并使用插
<div innerhtml.bind="myhtml"></div>
在哪里
var myhtml=“一些文本”;
说:
使用innerhtml属性绑定只需设置元素的
innerHTML属性。标记不会通过Aurelia的
模板系统绑定表达式和require元素将不会
接受评估。
创建一个组件并使用插槽如何
my component.html
<template>
<div><slot></slot></div>
</template>
<require from="./my-component.html"></require>
<my-component><div click.trigger='console.log(123)'>some text</div></my-component>
consumer.html
<template>
<div><slot></slot></div>
</template>
<require from="./my-component.html"></require>
<my-component><div click.trigger='console.log(123)'>some text</div></my-component>
一些文本