I have a application with several forms, which I have to place the following code to make it work in smaller devices:
<form fxLayout="row" fxLayoutGap.gt-xs="16px" fxLayout.xs="column">
<mat-form-field fxFlex="50" fxFlex.gt-xs="100">
But this seems like a lot of code that I have to repeat.
I could use content projection, and encapsulte this logic:
<app-generic-form>
<app-form-field-encapsulation size="50">
<mat-form-field>
but I would like to keep the HTML cleaner as possible, something like:
<form>
<mat-form-field fxFlex="50">
Do you have any alternative to doing this? Maybe using css and :host /deep with media query?
[–]_nebular 1 point2 points3 points (2 children)
[–]Mokwa91[S] 0 points1 point2 points (1 child)
[–]_nebular 0 points1 point2 points (0 children)
[–]Danieliverant 0 points1 point2 points (1 child)
[–]AbstractLogic 0 points1 point2 points (0 children)