We will also need to set up Angular Material and configure a theme to use, as covered in Chapter 5, Enhance Angular App with Angular Material:
- Install Angular Material:
$ npx ng add @angular/material$ npm i @angular/flex-layout hammerjs $ npx ng g m material --flat -m app
- Import and export MatButtonModule, MatToolbarModule, and MatIconModule
- Configure your default theme and register other Angular dependencies
- Add common css to styles.css as shown below,
src/styles.cssbody { margin: 0;}.margin-top { margin-top: 16px;}.horizontal-padding { margin-left: 16px; margin-right: 16px;}.flex-spacer { flex: 1 1 auto;}
Refer to Chapter 5, , for further configuration details. ...