Skip to content

Commit 485a463

Browse files
authoredFeb 6, 2020
fix(stack-blitz): default to form-field fill appearance (#712)
1 parent 81638a5 commit 485a463

File tree

1 file changed

+7
-1
lines changed
  • material.angular.io/src/assets/stack-blitz/src

1 file changed

+7
-1
lines changed
 

‎material.angular.io/src/assets/stack-blitz/src/main.ts

+7-1
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,13 @@ import {BrowserModule} from '@angular/platform-browser';
88
import {platformBrowserDynamic} from '@angular/platform-browser-dynamic';
99
import {BrowserAnimationsModule} from '@angular/platform-browser/animations';
1010
import {DemoMaterialModule} from './app/material-module';
11+
import {MAT_FORM_FIELD_DEFAULT_OPTIONS} from '@angular/material/form-field';
1112

1213
import {MaterialDocsExample} from './app/material-docs-example';
1314

15+
// Default MatFormField appearance to 'fill' as that is the new recommended approach and the
16+
// `legacy` and `standard` appearances are scheduled for deprecation in version 10.
17+
// This makes the examples that use MatFormField render the same in StackBlitz as on the docs site.
1418
@NgModule({
1519
imports: [
1620
BrowserModule,
@@ -24,7 +28,9 @@ import {MaterialDocsExample} from './app/material-docs-example';
2428
entryComponents: [MaterialDocsExample],
2529
declarations: [MaterialDocsExample],
2630
bootstrap: [MaterialDocsExample],
27-
providers: []
31+
providers: [
32+
{ provide: MAT_FORM_FIELD_DEFAULT_OPTIONS, useValue: { appearance: 'fill' } },
33+
]
2834
})
2935
export class AppModule {}
3036

0 commit comments

Comments
 (0)
Please sign in to comment.