|
6 | 6 | * found in the LICENSE file at https://angular.io/license |
7 | 7 | */ |
8 | 8 |
|
9 | | -import {VERSION as CDK_VERSION} from '@angular/cdk'; |
| 9 | +import {NgModule, InjectionToken, Optional, Inject, isDevMode, Version} from '@angular/core'; |
| 10 | +import {HammerLoader, HAMMER_LOADER} from '@angular/platform-browser'; |
10 | 11 | import {BidiModule} from '@angular/cdk/bidi'; |
11 | | -import {Inject, InjectionToken, isDevMode, NgModule, Optional} from '@angular/core'; |
12 | | -import {HAMMER_LOADER, HammerLoader} from '@angular/platform-browser'; |
13 | | -import {VERSION as MAT_VERSION} from '../version'; |
| 12 | +import {VERSION as CDK_VERSION} from '@angular/cdk'; |
| 13 | + |
| 14 | +// Private version constant to circumvent test/build issues, |
| 15 | +// i.e. avoid core to depend on the @angular/material primary entry-point |
| 16 | +// Can be removed once the Material primary entry-point no longer |
| 17 | +// re-exports all secondary entry-points |
| 18 | +const VERSION = new Version('0.0.0-PLACEHOLDER'); |
| 19 | + |
14 | 20 |
|
15 | 21 | /** Injection token that configures whether the Material sanity checks are enabled. */ |
16 | 22 | export const MATERIAL_SANITY_CHECKS = new InjectionToken<boolean>('mat-sanity-checks', { |
@@ -108,9 +114,9 @@ export class MatCommonModule { |
108 | 114 |
|
109 | 115 | /** Checks whether the material version matches the cdk version */ |
110 | 116 | private _checkCdkVersionMatch(): void { |
111 | | - if (MAT_VERSION.full !== CDK_VERSION.full) { |
| 117 | + if (VERSION.full !== CDK_VERSION.full) { |
112 | 118 | console.warn( |
113 | | - 'The Angular Material version (' + MAT_VERSION.full + ') does not match ' + |
| 119 | + 'The Angular Material version (' + VERSION.full + ') does not match ' + |
114 | 120 | 'the Angular CDK version (' + CDK_VERSION.full + ').\n' + |
115 | 121 | 'Please ensure the versions of these two packages exactly match.' |
116 | 122 | ); |
|
0 commit comments