[英]Regarding <mat-toolbar> in Angular
angular 中的 mat-toolbar 會在應用程序的所有組件/頁面中繼續嗎? 它是否在應用程序的所有組件中繼續?
<mat-toolbar color="primary">
<mat-toolbar-row>
<span>Welcome to Conflux Application</span>
</mat-toolbar-row>
這會涉及到路由的所有組件嗎?
假設,在您的 app.component.html 中,您有以下內容:
<mat-toolbar color="primary">
<span>Welcome</span>
</mat-toolbar>
<router-outlet></router-outlet>
所有后續頁面路由都將填充在 router-outlet 標簽中,使您的工具欄對所有頁面可見。
它與<mat-toolbar>
無關,它只是一個普通的 html 標簽,例如<b><i>
來解決您的問題,因為如果您使用了<mat-toolbar>
它的角度應用程序app.component.html
將充當默認組件在app.component.html
,所有后續頁面都將使用它。
您可以在下面找到更多詳細信息https://angular.io/guide/file-structure
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.