Skip to content

Commit

Permalink
fix: aot runtime issues (#3807)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
devversion authored and tinayuangao committed Mar 31, 2017
1 parent e7a4a03 commit f40296e
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 10 deletions.
1 change: 1 addition & 0 deletions src/demo-app/tsconfig-aot.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"extends": "./tsconfig-build",
"compilerOptions": {
"experimentalDecorators": true,
"outDir": ".",
"paths": {
"@angular/material": ["./material"]
}
Expand Down
10 changes: 0 additions & 10 deletions src/lib/core/core.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down Expand Up @@ -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';
Expand All @@ -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';

Expand Down

0 comments on commit f40296e

Please sign in to comment.