Material design is not showing up in Angular 12. Hi, I am new to angular (beginner). I tried using some material design element on top of angular 12, but I cannot see the material design changes in my test application.
Here are steps to reproduce:
- I created an app "test-anugular-mat" using
ng new test-anugular-mat. - After creating I added angular to the app using
ng add @angular/material. Here i have disabled "typography styles" and enabled "browser animations". - Added imported
MatButtoninapp.module.ts
import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { AppComponent } from './app.component';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { MatButton} from '@angular/material/button'
@NgModule({
declarations: [
AppComponent
],
imports: [
BrowserModule,
BrowserAnimationsModule,
MatButton
],
providers: [],
bootstrap: [AppComponent]
})
export class AppModule { }
- And added the following in my
index.html.
<h1>testing angular material</h1>
<p>testing angular material!!!</p>
<button mat-fab>test button</button>
<mat-card>Simple card</mat-card>
Here is the output I am getting, not the desired angular button or card while using ng serve

So I should get material design, what is the mistake I am doing here ?