Skip to content

Latest commit

 

History

History
51 lines (39 loc) · 1.26 KB

step_1.md

File metadata and controls

51 lines (39 loc) · 1.26 KB

Step 1

We already have a StackBlitz instance with some data, a service, and some types. ng add @angular/material has already been run, so Angular Material is ready to be used in the project. The pre-built theme is "deeppurple-amber."

In this step, you will add a <mat-toolbar> component.

Import the MatToolbarModule into AppModule

app.module.ts

import { MatToolbarModule } from '@angular/material/toolbar';

@NgModule({
  ...
  imports: [
    BrowserModule,
    BrowserAnimationsModule,
    MatToolbarModule,
  ],
  ...
})
Replace the welcome message with the toolbar. Make it deeppurple.

app.component.html

<mat-toolbar color="primary">
  <h1>Astronaut Directory</h1>
</mat-toolbar>