Skip to content

Commit f40296e

Browse files
devversiontinayuangao
authored andcommitted
fix: aot runtime issues (#3807)
* fix: aot runtime issues Currently when using the `MdSnackBar` in AOT, there will be runtime exceptions from the NgFactory. Those are caused by the re-exports of DI tokens. The Angular compiler will then look for the first export e.g `MdLiveAnnouncer` and the normal `LiveAnnouncer` export wont be included in the factory. This is breaking at runtime now, because the NgFactory searches for `LiveAnnouncer` but there is only the `LiveAnnouncer` (DI exception) Since this deprecation is pretty old we can safely remove it anyways. Although this is probably an Angular that should be reported separately. Also this commit fixes the output directory of the `aot` gulp task. Currently it outputs the factories in a wrong directory. (This allows us to serve the aot demo-app in the future) * Remove MdUniqueSelectionDispatcher
1 parent e7a4a03 commit f40296e

File tree

2 files changed

+1
-10
lines changed

2 files changed

+1
-10
lines changed

src/demo-app/tsconfig-aot.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
"extends": "./tsconfig-build",
66
"compilerOptions": {
77
"experimentalDecorators": true,
8+
"outDir": ".",
89
"paths": {
910
"@angular/material": ["./material"]
1011
}

src/lib/core/core.ts

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,6 @@ export {DomPortalHost} from './portal/dom-portal-host';
3636
// Platform
3737
export * from './platform/index';
3838

39-
/** @deprecated */
40-
export {Platform as MdPlatform} from './platform/platform';
41-
4239
// Overlay
4340
export {Overlay, OVERLAY_PROVIDERS} from './overlay/overlay';
4441
export {OverlayContainer} from './overlay/overlay-container';
@@ -75,9 +72,6 @@ export {
7572
// Selection
7673
export * from './selection/selection';
7774

78-
/** @deprecated */
79-
export {LiveAnnouncer as MdLiveAnnouncer} from './a11y/live-announcer';
80-
8175
export * from './a11y/focus-trap';
8276
export {InteractivityChecker} from './a11y/interactivity-checker';
8377
export {isFakeMousedownFromScreenReader} from './a11y/fake-mousedown';
@@ -89,10 +83,6 @@ export {
8983
UniqueSelectionDispatcherListener,
9084
UNIQUE_SELECTION_DISPATCHER_PROVIDER,
9185
} from './coordination/unique-selection-dispatcher';
92-
/** @deprecated */
93-
export {
94-
UniqueSelectionDispatcher as MdUniqueSelectionDispatcher
95-
} from './coordination/unique-selection-dispatcher';
9686

9787
export {MdLineModule, MdLine, MdLineSetter} from './line/line';
9888

0 commit comments

Comments
 (0)