小编Tau*_*sif的帖子

angular/flex-layout not working with angular 9

I had setup a basic project with angular 9 , angular material and angular/flex-layout. How ever I cannot get angular/flex-layout working . Here is what I have done

Login-view.component.ts

<div class="container"  fxLayout="row" fxLayoutAlign="center center" >

  <mat-card class="login-box">
    <mat-card-title>Login</mat-card-title>
    <mat-card-content>
      <form #loginForm="ngForm" (ngSubmit)="login(loginForm)">
        <p>
          <mat-form-field>
            <input type="text" name="username" matInput placeholder="Username" ngModel required />
          </mat-form-field>
        </p>

        <p>
          <mat-form-field>
            <input type="password" name="password" matInput placeholder="Password" ngModel required />
          </mat-form-field>
        </p>
        <div class="button">
          <button type="submit" mat-button>Login</button>
        </div>
      </form>
    </mat-card-content>
  </mat-card>

</div>
Run Code Online (Sandbox Code Playgroud)

login-view.component.scss

mat-form-field{
    width: 100%; …
Run Code Online (Sandbox Code Playgroud)

flexbox angular-flex-layout angular angular9

3
推荐指数
1
解决办法
6866
查看次数

标签 统计

angular ×1

angular-flex-layout ×1

angular9 ×1

flexbox ×1