How can i use angular material with ionic?

Yes, you can use Angular Material with Ionic. In fact, Ionic has built-in support for Angular Material.


To use Angular Material with Ionic, you need to install the

@angular/material
package and its dependencies in your project:


npm install @angular/material @angular/cdk @angular/animations

npm install @angular/material @angular/cdk @angular/animations

Then, you can import and use Angular Material components in your Ionic app. For example, you can import the MatButtonModule and use the mat-button directive in your template:

import { MatButtonModule } from '@angular/material/button';

@NgModule({
  declarations: [
    // ...
  ],
  imports: [
    // ...
    MatButtonModule
  ],
  bootstrap: [AppComponent]
})
export class AppModule { }

And in your template:

<button mat-button>My Button</button>


You can find more information about using Angular Material with Ionic in the official documentation:

  https://ionicframework.com/docs/utilities/angular-material

Previous Post Next Post