From f40296e0fa09341a850cbd76e19bb610493f0376 Mon Sep 17 00:00:00 2001 From: Paul Gschwendtner Date: Sat, 1 Apr 2017 01:14:25 +0200 Subject: [PATCH] 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 --- src/demo-app/tsconfig-aot.json | 1 + src/lib/core/core.ts | 10 ---------- 2 files changed, 1 insertion(+), 10 deletions(-) diff --git a/src/demo-app/tsconfig-aot.json b/src/demo-app/tsconfig-aot.json index eadf8e0b252..ddf458a1634 100644 --- a/src/demo-app/tsconfig-aot.json +++ b/src/demo-app/tsconfig-aot.json @@ -5,6 +5,7 @@ "extends": "./tsconfig-build", "compilerOptions": { "experimentalDecorators": true, + "outDir": ".", "paths": { "@angular/material": ["./material"] } diff --git a/src/lib/core/core.ts b/src/lib/core/core.ts index 4ae90436c01..5f6ebe2731c 100644 --- a/src/lib/core/core.ts +++ b/src/lib/core/core.ts @@ -36,9 +36,6 @@ export {DomPortalHost} from './portal/dom-portal-host'; // Platform export * from './platform/index'; -/** @deprecated */ -export {Platform as MdPlatform} from './platform/platform'; - // Overlay export {Overlay, OVERLAY_PROVIDERS} from './overlay/overlay'; export {OverlayContainer} from './overlay/overlay-container'; @@ -75,9 +72,6 @@ export { // Selection export * from './selection/selection'; -/** @deprecated */ -export {LiveAnnouncer as MdLiveAnnouncer} from './a11y/live-announcer'; - export * from './a11y/focus-trap'; export {InteractivityChecker} from './a11y/interactivity-checker'; export {isFakeMousedownFromScreenReader} from './a11y/fake-mousedown'; @@ -89,10 +83,6 @@ export { UniqueSelectionDispatcherListener, UNIQUE_SELECTION_DISPATCHER_PROVIDER, } from './coordination/unique-selection-dispatcher'; -/** @deprecated */ -export { - UniqueSelectionDispatcher as MdUniqueSelectionDispatcher -} from './coordination/unique-selection-dispatcher'; export {MdLineModule, MdLine, MdLineSetter} from './line/line';