Peter Malina
CTO @ FlowUp
peter.malina@flowup.cz
<div fxLayout="column">
<div fxLayout="row" fxLayoutGap="16px">
<input placeholder="Name">
<input placeholder="Surname">
</div>
<div fxLayout fxLayoutGap="16px">
<input placeholder="Email" type="email">
<mat-select placeholder="Gender">
<mat-option value="unicorn">Unicorn</mat-option>
<mat-option value="noUnicorn">No Unicorn</mat-option>
</mat-select>
</div>
<button mat-raised-button color="primary">Register</button>
</div>
<div fxLayout="row" fxLayout.xs="column" fxLayoutAlign="start">
<div fxLayout="row" fxLayout.xs="column" fxLayoutGap="16px">
<input placeholder="Email" type="email">
<mat-select #gender placeholder="Gender">
<mat-option value="unicorn">Unicorn</mat-option>
<mat-option value="noUnicorn">No Unicorn</mat-option>
</mat-select>
</div>
<button [fxHide]="gender.value == 'unicorn'">Register</button>
</div>
function updateBreakpoints(bp: BreakPoint) {
switch(bp.alias) {
case 'xs' : bp.mediaQuery = '(max-width: 470px)'; break;
case 'sm' : bp.mediaQuery = '(min-width: 471px) and (max-width: 820px)'; break;
}
return bp;
}
// ngModule
providers: [
{
provide : BREAKPOINTS,
useFactory : function customizeBreakPoints() {
return validateSuffixes(DEFAULT_BREAKPOINTS.map( updateBreakpoints ));
}
}
]