2
votes

I added button but after compiling I faced this issue, let me know how to add this dependencies:

ERROR in The target entry-point "@angular/material/button" has missing dependencies:
- @angular/core
- @angular/cdk/a11y
- @angular/platform-browser/animations
- @angular/cdk/coercion

2
Hello and Welcome to Stack Overflow! Did you use @angular/cli to create your project? - Josef Katič
yes, I used @angular/cli to create my project - Amit Rai

2 Answers

0
votes

Try to add "MatButtonModule" to your app.module.ts or maybe your material.module.ts. Depends on the way you have setted it up.

Be sure it is part of your imports and exports:

import { MatButtonModule } from '@angular/material';
@NgModule({
  imports: [MatButtonModule],
  exports: [MatButtonModule]
})
0
votes

Try npm install --save @angular/material @angular/cdk If you just installed @angular/material it possibly won't work.