Material design component "is not a known element" in Angular2 Material design component "is not a known element" in Angular2 angular angular

Material design component "is not a known element" in Angular2


It should be

<button md-button>foo</button>   

OR

<button md-raised-button>foo</button>


Sometimes when you add new component to the angular2 it does't directly register the tag in such cases you have to do 2 things:

Go to app.component.ts file

  • 1) Insert manually in "import {component}" the button you want to add
  • 2) In the @Component register your component and give the path