|
6 | 6 | * found in the LICENSE file at https://angular.io/license |
7 | 7 | */ |
8 | 8 |
|
9 | | -import {NgModule, InjectionToken, Optional, Inject, isDevMode, Version} from '@angular/core'; |
10 | | -import {HammerLoader, HAMMER_LOADER} from '@angular/platform-browser'; |
11 | | -import {BidiModule} from '@angular/cdk/bidi'; |
12 | 9 | 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 | | - |
| 10 | +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'; |
20 | 14 |
|
21 | 15 | /** Injection token that configures whether the Material sanity checks are enabled. */ |
22 | 16 | export const MATERIAL_SANITY_CHECKS = new InjectionToken<boolean>('mat-sanity-checks', { |
@@ -114,9 +108,9 @@ export class MatCommonModule { |
114 | 108 |
|
115 | 109 | /** Checks whether the material version matches the cdk version */ |
116 | 110 | private _checkCdkVersionMatch(): void { |
117 | | - if (VERSION.full !== CDK_VERSION.full) { |
| 111 | + if (MAT_VERSION.full !== CDK_VERSION.full) { |
118 | 112 | console.warn( |
119 | | - 'The Angular Material version (' + VERSION.full + ') does not match ' + |
| 113 | + 'The Angular Material version (' + MAT_VERSION.full + ') does not match ' + |
120 | 114 | 'the Angular CDK version (' + CDK_VERSION.full + ').\n' + |
121 | 115 | 'Please ensure the versions of these two packages exactly match.' |
122 | 116 | ); |
|
0 commit comments