Home > Back-end >  Using Angular Material Button by itself in a Stackblitz?
Using Angular Material Button by itself in a Stackblitz?

Time:05-01

I use Angular Material all the time on Stackblitz, and usually I import a kitchen sink module, and everything just works.

Now I'm trying to just import the Angular Material Button Module, and I get the error:

Error in src/app/app.component.ts (8:14)
Unable to import component MatButton.
The symbol is not exported from /turbo_modules/@angular/[email protected]/button/button-module.d.ts (module '@angular/material/button/button-module').

This is the Stackblitz: https://stackblitz.com/edit/angular-ivy-wxvebj?file=src/app/app.module.ts

Any ideas?

CodePudding user response:

You are importing MatButtonModule from @angular/material/button/button-module when you should import it from @angular/material/button

  • Related