如何使用FlexLayout居中文本

时间:2019-04-07 13:33:12

标签: angular

我正在研究响应式导航组件。我能够右对齐链接,但无法将“ BuySell”文本在组件中居中。这是HTML代码。

<div class="app-container">
   <mat-toolbar  color="white"
       fxLayoutGap="8px"  
       class="app-toolbar" >  
       <div fxHide.gt-xs>
        <button mat-icon-button (click)="onToggleSidenav()">
            <mat-icon>menu</mat-icon>
        </button>
       </div>
       <div class="icon-center" fxLayout fxLayoutAlign="center">
        BuySell
       </div>
            <div fxFlex fxLayout fxLayoutAlign="end" fxHide.xs>
                <ul fxLayout fxLayoutGap="15px" class="navigation-items">
                    <li>
                        <a routerLink="/home">Home</a>
                    </li>
                    <li>
                        <a routerLink="/auth">Log In</a>
                    </li>
                </ul>
         </div>
        <ng-template #logOut>
        <div >
            <button class="button--text-only" (click)=onLogOut()  
               routerLink="home">Log Out</button>
         </div>
        </ng-template>
    </mat-toolbar>
</div>

这里是stackblitz

1 个答案:

答案 0 :(得分:0)

尝试这样

grant_type=authorization_code
code=<the code from the previous step>
client_id=<the client ID token created in the APIs Console>
client_secret=<the client secret corresponding to the client ID>
redirect_uri=<the URI registered with the client ID>

STACKBLITZ DEMO