![]() |
1
2
第一次阅读 Angular Component Interaction . 然后您将知道组件之间有4种主要的通信方式。
在您的场景中,您可以使用任何您想要的方法。 看看这个例子 子组件.ts
child.component.html(子组件.html)
应用组件.ts
app.component.html(应用程序组件.html)
应用程序组件.css
在这里我用了 父级侦听子事件 方法。 我创造了一个 stackblitz 为了这个。 |
![]() |
2
0
HTML: 你好.componemt.html
app.component.html(应用程序组件.html)
TS: 您好,component.ts:
应用组件.ts:
|
![]() |
Pikachu620 · 可以对事件列表进行排序吗? 2 年前 |
![]() |
makerbaker · 取消选中框Javascript后重置输入值? 2 年前 |
![]() |
sam_rox · 在Matlab ODE中使用事件内部的两个条件 6 年前 |
![]() |
Santosh · javafx中的按键事件 6 年前 |
![]() |
KarLito · 删除或切换Highcharts上的事件 6 年前 |
|
JWoods4 · 读取击键并放入文本框 6 年前 |
![]() |
Everett Kaser · 在事件处理程序中绘制到NSView 6 年前 |