Skip to content

Commit 9b8dbd3

Browse files
committed
fix(???): make ErrorStateMatcher tree-shakable
In order to be tree-shakable, services must be marked as `providedIn` and they must not be explicitly referenced in the `providers` of an `NgModule`.
1 parent 84ff2e6 commit 9b8dbd3

File tree

4 files changed

+1
-6
lines changed

4 files changed

+1
-6
lines changed

src/material-experimental/mdc-chips/module.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ const CHIP_DECLARATIONS = [
4040
exports: CHIP_DECLARATIONS,
4141
declarations: CHIP_DECLARATIONS,
4242
providers: [
43-
ErrorStateMatcher,
4443
{
4544
provide: MAT_CHIPS_DEFAULT_OPTIONS,
4645
useValue: {

src/material/chips/chips-module.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88

99
import {ENTER} from '@angular/cdk/keycodes';
1010
import {NgModule} from '@angular/core';
11-
import {ErrorStateMatcher} from '@angular/material/core';
1211
import {MatChip, MatChipAvatar, MatChipRemove, MatChipTrailingIcon} from './chip';
1312
import {MAT_CHIPS_DEFAULT_OPTIONS, MatChipsDefaultOptions} from './chip-default-options';
1413
import {MatChipInput} from './chip-input';
@@ -27,7 +26,6 @@ const CHIP_DECLARATIONS = [
2726
exports: CHIP_DECLARATIONS,
2827
declarations: CHIP_DECLARATIONS,
2928
providers: [
30-
ErrorStateMatcher,
3129
{
3230
provide: MAT_CHIPS_DEFAULT_OPTIONS,
3331
useValue: {

src/material/input/input-module.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88

99
import {TextFieldModule} from '@angular/cdk/text-field';
1010
import {NgModule} from '@angular/core';
11-
import {ErrorStateMatcher} from '@angular/material/core';
1211
import {MatFormFieldModule} from '@angular/material/form-field';
1312
import {MatTextareaAutosize} from './autosize';
1413
import {MatInput} from './input';
@@ -27,6 +26,5 @@ import {MatInput} from './input';
2726
MatInput,
2827
MatTextareaAutosize,
2928
],
30-
providers: [ErrorStateMatcher],
3129
})
3230
export class MatInputModule {}

src/material/stepper/stepper-module.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,6 @@ import {MAT_STEPPER_INTL_PROVIDER} from './stepper-intl';
5454
MatStepHeader,
5555
MatStepperIcon,
5656
],
57-
providers: [MAT_STEPPER_INTL_PROVIDER, ErrorStateMatcher],
57+
providers: [MAT_STEPPER_INTL_PROVIDER],
5858
})
5959
export class MatStepperModule {}

0 commit comments

Comments
 (0)