From 42b2a00859e26241901d8d8d196f6b5b18be927a Mon Sep 17 00:00:00 2001 From: Paul Gschwendtner Date: Mon, 27 Mar 2017 19:03:35 +0200 Subject: [PATCH 1/2] 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) --- src/demo-app/tsconfig-aot.json | 1 + src/lib/core/core.ts | 6 ------ 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/src/demo-app/tsconfig-aot.json b/src/demo-app/tsconfig-aot.json index c2ad1d498dc4..53d56800b2aa 100644 --- a/src/demo-app/tsconfig-aot.json +++ b/src/demo-app/tsconfig-aot.json @@ -3,6 +3,7 @@ "extends": "./tsconfig", "compilerOptions": { "experimentalDecorators": true, + "outDir": ".", "paths": { "@angular/material": ["./material"] } diff --git a/src/lib/core/core.ts b/src/lib/core/core.ts index 04814c0de02a..3295fab0e1ad 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'; @@ -74,9 +71,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'; From c57a231c5991c73540f17163ada875357356f522 Mon Sep 17 00:00:00 2001 From: Paul Gschwendtner Date: Thu, 30 Mar 2017 19:38:00 +0200 Subject: [PATCH 2/2] Remove MdUniqueSelectionDispatcher --- src/lib/core/core.ts | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/lib/core/core.ts b/src/lib/core/core.ts index 3295fab0e1ad..8d25d4fec50f 100644 --- a/src/lib/core/core.ts +++ b/src/lib/core/core.ts @@ -82,10 +82,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';