denizcoskun / angular4-material-seed

Angular 4 + Material + FlexLayout Seed
MIT License
1 stars 1 forks source link

'md-toolbar' is not a known element: #1

Open KeithPepin-CyG opened 7 years ago

KeithPepin-CyG commented 7 years ago

Steps to reproduce:

  1. download and unzip the angular4-material-seed.
  2. npm install
  3. npm test

Note the failed specs resulting from the following error:

Failed: Template parse errors: 'md-toolbar' is not a known element:

  1. If 'md-toolbar' is an Angular component, then verify that it is part of this module.
  2. If 'md-toolbar' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message. ("[ERROR ->]My App
BrunoLopes commented 6 years ago

I think it's happening because now it's mat-toolbar, isn't it?

keenanstewart commented 6 years ago

Also I found that if you encounter issues such as md- whatever is an unknown element, change it to mat- whatever. Examples I found are md-toolbar, md-icon, and md-menu. I had to change all of these to mat- and it worked. Also I had to change the mdMenu to matMenu and viola!