You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
MdSnackBar doesn't work with AOT compilation (angular/cli).
ERROR Error: Uncaught (in promise): Error: No provider for t!
Error
at g (polyfills.794b327….bundle.js:36)
at k (vendor.4ef56f0….bundle.js:204)
at O (vendor.4ef56f0….bundle.js:204)
at t._throwOrNull (vendor.4ef56f0….bundle.js:351)
at t._getByKeyDefault (vendor.4ef56f0….bundle.js:351)
at t._getByKey (vendor.4ef56f0….bundle.js:351)
at t.get (vendor.4ef56f0….bundle.js:351)
at e.get [as _MdSnackBar_104] (main.b2f8da9….bundle.js:1)
at e.getInternal (main.b2f8da9….bundle.js:1)
at e.t.get (vendor.4ef56f0….bundle.js:365)
at e.t.get (vendor.4ef56f0….bundle.js:365)
at t.get [as _MdSnackBar_67] (13.d98dce3….chunk.js:8)
at t.getInternal (13.d98dce3….chunk.js:8)
at t.get (vendor.4ef56f0….bundle.js:365)
at un (vendor.4ef56f0….bundle.js:281)
at g (polyfills.794b327….bundle.js:36)
at k (vendor.4ef56f0….bundle.js:204)
at O (vendor.4ef56f0….bundle.js:204)
at t._throwOrNull (vendor.4ef56f0….bundle.js:351)
at t._getByKeyDefault (vendor.4ef56f0….bundle.js:351)
at t._getByKey (vendor.4ef56f0….bundle.js:351)
at t.get (vendor.4ef56f0….bundle.js:351)
at e.get [as _MdSnackBar_104] (main.b2f8da9….bundle.js:1)
at e.getInternal (main.b2f8da9….bundle.js:1)
at e.t.get (vendor.4ef56f0….bundle.js:365)
at e.t.get (vendor.4ef56f0….bundle.js:365)
at t.get [as _MdSnackBar_67] (13.d98dce3….chunk.js:8)
at t.getInternal (13.d98dce3….chunk.js:8)
at t.get (vendor.4ef56f0….bundle.js:365)
at un (vendor.4ef56f0….bundle.js:281)
at g (polyfills.794b327….bundle.js:36)
at l (polyfills.794b327….bundle.js:36)
at l (polyfills.794b327….bundle.js:36)
at polyfills.794b327….bundle.js:36
at t.invokeTask (polyfills.794b327….bundle.js:36)
at Object.onInvokeTask (vendor.4ef56f0….bundle.js:365)
at t.invokeTask (polyfills.794b327….bundle.js:36)
at n.runTask (polyfills.794b327….bundle.js:36)
at u (polyfills.794b327….bundle.js:36)
at XMLHttpRequest.invoke (polyfills.794b327….bundle.js:36)
What are the steps to reproduce?
Import MdSnackBar as DI in any component and run npm run build -- -prod.
Which versions of Angular, Material, OS, browsers are affected?
I had the same issue, fixed it by adding ' LiveAnnouncer' to the list of providers, after importing:
import { MaterialModule, LiveAnnouncer } from '@angular/material';
Bug, feature request, or proposal:
Bug.
What is the expected behavior?
MdSnackBar works with AOT compilation.
What is the current behavior?
MdSnackBar doesn't work with AOT compilation (angular/cli).
What are the steps to reproduce?
Import
MdSnackBar
as DI in any component and runnpm run build -- -prod
.Which versions of Angular, Material, OS, browsers are affected?
angular/material: 2.0.0-beta.2 (from material2-builds)
angular/cli: 1.0.0
node: 7.7.4
os: darwin x64
angular: 4.0.0
The text was updated successfully, but these errors were encountered: