加载另一个组件而不是 root-app-component

Loading another component instead of root-app-component

当我们使用angular路由时,是否可以根据给定的路由在主HTML页面中加载另一个组件而不是root-app组件?

在您的根应用程序上添加 <router-outlet></router-outlet> 元素。我认为它会起作用。

您可以将默认页面从 index.html 更改为 angular.json 中的不同页面。您还可以将 index.html 中的选择器从 root-app 更改为任何其他组件。您也可以使用路由器插座