我在主页上有三个链接:-
ComponentA ComponentB ComponentC
现在,如果我单击ComponentA,则输出为
**** ComponentA ComponentB ComponentC ComponentA有效。****
我希望看到输出,即单击组件A之后,将仅显示组件A
ComponentA有效
我是Angular 8的新手,只知道基础知识。请帮忙
答案 0 :(得分:0)
在您的app.cpmponent.html中添加<router-outlet></router-outlet>
并删除其他组件