Angular 2(点击)带有未知的 html 标签
Angular 2 (click) with unknown html tags
(click)
事件未在模板的组件控制器上触发:
<Shape *ng-for="#c of coords" inner-html="{{c.ts}}"
(click)="shapeSelected(t.subShapeID)"
attr.shapeid="{{c.subShapeID}}" render="true" onmouseover="enter(this)"
onmouseout="leave(this)" isPickable="true"> </Shape>
这里的 Shape 是一个 X3dom 元素(没有 angular2 组件)。
编辑:这适用于标准 html 标签,例如
<tr *ng-for="#t of coords" (click)="shapeSelected(t.subShapeID)">
<td style="padding:0px 10px;">Shape</td>
<td>{{t.subShapeID}}</td>
</tr>
未知的 html 标签怎么可能?
我想控制台没有在模板中定义。尝试在将执行 console.log()
的形状组件中创建方法
(click)
事件未在模板的组件控制器上触发:
<Shape *ng-for="#c of coords" inner-html="{{c.ts}}"
(click)="shapeSelected(t.subShapeID)"
attr.shapeid="{{c.subShapeID}}" render="true" onmouseover="enter(this)"
onmouseout="leave(this)" isPickable="true"> </Shape>
这里的 Shape 是一个 X3dom 元素(没有 angular2 组件)。
编辑:这适用于标准 html 标签,例如
<tr *ng-for="#t of coords" (click)="shapeSelected(t.subShapeID)">
<td style="padding:0px 10px;">Shape</td>
<td>{{t.subShapeID}}</td>
</tr>
未知的 html 标签怎么可能?
我想控制台没有在模板中定义。尝试在将执行 console.log()
的形状组件中创建方法