Skip to content

Commit

Permalink
refactor: remove compatibility mode (#7689)
Browse files Browse the repository at this point in the history
Since the switch to the `mat-` prefix, the compatibility mode is no longer necessary. These changes remove anything that was left.

BREAKING CHANGE:
The `MATERIAL_COMPATIBILITY_MODE`, `CompatibilityModule`, `NoConflictStyleCompatibilityMode`, `MatPrefixRejector`, `MdPrefixRejector` symbols have been removed.
  • Loading branch information
crisbeto authored and mmalerba committed Oct 27, 2017
1 parent f806286 commit dcef604
Show file tree
Hide file tree
Showing 8 changed files with 11 additions and 251 deletions.
1 change: 0 additions & 1 deletion .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@
/src/lib/core/* @jelbourn
/src/lib/core/animation/** @jelbourn
/src/lib/core/common-behaviors/** @jelbourn
/src/lib/core/compatibility/** @jelbourn
/src/lib/core/datetime/** @mmalerba
/src/lib/core/error/** @crisbeto @mmalerba
/src/lib/core/gestures/** @jelbourn
Expand Down
22 changes: 0 additions & 22 deletions guides/compatibility-mode.md

This file was deleted.

7 changes: 3 additions & 4 deletions src/lib/core/common-behaviors/common-module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@

import {NgModule, InjectionToken, Optional, Inject, isDevMode} from '@angular/core';
import {BidiModule} from '@angular/cdk/bidi';
import {CompatibilityModule} from '../compatibility/compatibility';


/** Injection token that configures whether the Material sanity checks are enabled. */
Expand All @@ -17,13 +16,13 @@ export const MATERIAL_SANITY_CHECKS = new InjectionToken<boolean>('mat-sanity-ch

/**
* Module that captures anything that should be loaded and/or run for *all* Angular Material
* components. This includes Bidi, compatibility mode, etc.
* components. This includes Bidi, etc.
*
* This module should be imported to each top-level component module (e.g., MatTabsModule).
*/
@NgModule({
imports: [CompatibilityModule, BidiModule],
exports: [CompatibilityModule, BidiModule],
imports: [BidiModule],
exports: [BidiModule],
providers: [{
provide: MATERIAL_SANITY_CHECKS, useValue: true,
}],
Expand Down
Empty file.
205 changes: 0 additions & 205 deletions src/lib/core/compatibility/compatibility.ts

This file was deleted.

1 change: 0 additions & 1 deletion src/lib/core/public-api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@

export * from './animation/animation';
export * from './common-behaviors/index';
export * from './compatibility/compatibility';
export * from './datetime/index';
export * from './error/error-options';
export * from './gestures/gesture-annotations';
Expand Down
24 changes: 6 additions & 18 deletions src/lib/stepper/stepper.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -722,9 +722,7 @@ class SimpleMatHorizontalStepperApp {
<mat-step [stepControl]="oneGroup">
<form [formGroup]="oneGroup">
<ng-template matStepLabel>Step one</ng-template>
<mat-form-field>
<input matInput formControlName="oneCtrl" required>
</mat-form-field>
<input formControlName="oneCtrl" required>
<div>
<button mat-button matStepperPrevious>Back</button>
<button mat-button matStepperNext>Next</button>
Expand All @@ -734,9 +732,7 @@ class SimpleMatHorizontalStepperApp {
<mat-step [stepControl]="twoGroup">
<form [formGroup]="twoGroup">
<ng-template matStepLabel>Step two</ng-template>
<mat-form-field>
<input matInput formControlName="twoCtrl" required>
</mat-form-field>
<input formControlName="twoCtrl" required>
<div>
<button mat-button matStepperPrevious>Back</button>
<button mat-button matStepperNext>Next</button>
Expand All @@ -746,9 +742,7 @@ class SimpleMatHorizontalStepperApp {
<mat-step [stepControl]="threeGroup" optional>
<form [formGroup]="threeGroup">
<ng-template matStepLabel>Step two</ng-template>
<mat-form-field>
<input matInput formControlName="threeCtrl">
</mat-form-field>
<input formControlName="threeCtrl">
<div>
<button mat-button matStepperPrevious>Back</button>
<button mat-button matStepperNext>Next</button>
Expand Down Expand Up @@ -818,9 +812,7 @@ class SimpleMatVerticalStepperApp {
<mat-step [stepControl]="oneGroup">
<form [formGroup]="oneGroup">
<ng-template matStepLabel>Step one</ng-template>
<mat-form-field>
<input matInput formControlName="oneCtrl" required>
</mat-form-field>
<input formControlName="oneCtrl" required>
<div>
<button mat-button matStepperPrevious>Back</button>
<button mat-button matStepperNext>Next</button>
Expand All @@ -830,9 +822,7 @@ class SimpleMatVerticalStepperApp {
<mat-step [stepControl]="twoGroup">
<form [formGroup]="twoGroup">
<ng-template matStepLabel>Step two</ng-template>
<mat-form-field>
<input matInput formControlName="twoCtrl" required>
</mat-form-field>
<input formControlName="twoCtrl" required>
<div>
<button mat-button matStepperPrevious>Back</button>
<button mat-button matStepperNext>Next</button>
Expand All @@ -842,9 +832,7 @@ class SimpleMatVerticalStepperApp {
<mat-step [stepControl]="threeGroup" optional>
<form [formGroup]="threeGroup">
<ng-template matStepLabel>Step two</ng-template>
<mat-form-field>
<input matInput formControlName="threeCtrl">
</mat-form-field>
<input formControlName="threeCtrl">
<div>
<button mat-button matStepperPrevious>Back</button>
<button mat-button matStepperNext>Next</button>
Expand Down
2 changes: 2 additions & 0 deletions src/universal-app/kitchen-sink/kitchen-sink.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ import {
MatToolbarModule,
MatTooltipModule,
MatStepperModule,
MatButtonToggleModule,
MatCheckboxModule,
} from '@angular/material';
import {
CdkTableModule,
Expand Down

0 comments on commit dcef604

Please sign in to comment.