Angular 没有标签的路由器出口?

Angular 没有标签的路由器出口?,angular,router,Angular,Router,如果我对任何组件使用路由器出口或任何其他选择器,例如,我最终会在标记中显示该组件的HTML代码,如下所示: <component> <!-- component html here --> </component> 我需要的是这个组件html只替换 <component></component> 您可以使用 标签中组件的HTML代码如下所示

如果我对任何组件使用路由器出口或任何其他选择器,例如,我最终会在标记中显示该组件的HTML代码,如下所示:

<component>
  <!-- component html here -->
</component>

我需要的是这个组件html只替换

<component></component>

您可以使用
标签中组件的HTML代码如下所示