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)