Migrating to Angular Material 2.0.0.beta.11
if you're getting any of these errors suddenly or with adding new Material Angular elements:
ERROR in Error: MatMenuModule is not an NgModule
or Mat<module name>Module
Template parse errors: There is no directive with “exportAs” set to “matMenu”
ERROR in Error: MatMenuModule is not an NgModule
or Mat<module name>Module
Template parse errors: There is no directive with “exportAs” set to “matMenu”
or Mat<component name>
There is no directive with "exportAs" set to "mdMenu" ("<button md-button [mdMenuTriggerFor]="menu">Menu</button>
than your problem just seem's foul, but its simple.
head over to `package.json` and replace all the places with `^4.X.X` to `^4.4.3` or greater (4.4.4 avail to the time of writting)
then, do to ALL your filed with some Material stuff, and change `md-`, `md` or `Md` to `mat-`, `mat` or `Mat`, including modules, components, imports, htmls, tags and attributes.
and all should work again.
if too annoying, you can just state the build for beta 10 which i believe means (didnt test):
"@angular/material": "^2.0.0.beta.10",
GL&HF!
Fantastic article. Thanks to the author. I learnt many things from your blog. Thank you.
ReplyDeleteI referred your blog and the website
https://www.wikitechy.com/tutorials/angular-material/
Thanks to you both for helping me.