Adding Angular Material to Our Application
Learn how to add Angular Material controls and theming to the Angular component.
We'll cover the following...
We'll cover the following...
Adding Angular Material controls
To start using a UI control from the Angular Material library, such as a button or checkbox, we need to import its corresponding module. Let’s see how this is done by adding a button control in the main component of an Angular application:
Open the
app.module.ts
file and add the followingimport
statement to use Angular Material buttons:
import { MatButtonModule } from '@angular/material/button';
Importing MatButtonModule
We don’t import directly from @angular/material
because every module has a dedicated ...