Angular:如何通过 ViewChild 按 ID 注入子组件类

my_component_markup.html
<app-my-component #myId></app-dynamic-plot>
viewchild_inject.ts
@ViewChild('myid', {read: MyComponent}) myComponent!: MyComponent;

Check out similar posts by category: Angular