Templates 使用ng内容访问父组件中的子组件

Templates 使用ng内容访问父组件中的子组件,templates,angular,parent-child,Templates,Angular,Parent Child,我有一个父组件,它的模板中有动态数量的子组件 这是创建父级的方式: <parent> <child> custom html </child> <child> custom html </child> </parent> 自定义html 自定义html 这是父组件: @Component({ selector: 'parent', temp

我有一个父组件,它的模板中有动态数量的子组件

这是创建父级的方式:

<parent>
    <child>
        custom html
    </child>
    <child>
        custom html
    </child>
</parent>

自定义html
自定义html
这是父组件:

@Component({
    selector: 'parent',
    template: `
        <div class="parent-children">
            <ng-content></ng-content>
        </div>        
    `
})
@组件({
选择器:'父',
模板:`
`
})
我的问题是,我想在子1和子2之间动态插入特定的HTML,最好的选择是在父组件内部执行

基本上我需要这样的东西(虽然这不起作用,只是演示):

@组件({
选择器:'父',
模板:`
`
})
请注意,我可以访问“家长”中的孩子,但这没有多大帮助:

@ContentChildren(Child) 
private children: QueryList<Child>;
@ContentChildren(Child)
私生子女:QueryList;
有没有办法实现类似的目标?基本上是在父模板中选择特定的子对象,尽管它们已经在父对象的基本html标记中定义(不是通过ngFor从某些数据源中直接添加的)

问候

@ContentChildren(Child) 
private children: QueryList<Child>;