Skip to content

Commit 11f8a43

Browse files
committed
Globally set Material form field 'appearance' to 'outline'
Also set 'subscriptSizing' to 'dynamic' to only add spacing below the form fields when errors are triggered
1 parent 895d05a commit 11f8a43

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/app/app.config.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,9 @@ import {
55
} from '@angular/core';
66
import { provideRouter } from '@angular/router';
77

8-
import { routes } from './app.routes';
98
import { provideHttpClient } from '@angular/common/http';
9+
import { MAT_FORM_FIELD_DEFAULT_OPTIONS } from '@angular/material/form-field';
10+
import { routes } from './app.routes';
1011
import { GlobalErrorHandler } from './error-handler/error-handler';
1112

1213
export const appConfig: ApplicationConfig = {
@@ -15,5 +16,9 @@ export const appConfig: ApplicationConfig = {
1516
provideZoneChangeDetection({ eventCoalescing: true }),
1617
provideRouter(routes),
1718
{ provide: ErrorHandler, useClass: GlobalErrorHandler },
19+
{
20+
provide: MAT_FORM_FIELD_DEFAULT_OPTIONS,
21+
useValue: { appearance: 'outline', subscriptSizing: 'dynamic' },
22+
},
1823
],
1924
};

0 commit comments

Comments
 (0)