Serving data with Angular Material
To implement a table with paging, sorting, and filtering features, we’re going to use Angular Material, the UI component library that we already introduced in Chapter 4, Front-End and Back-End Interactions.
However, before adding new Angular Material components, we’ll take the chance to apply a bit of refactoring to the way we’ve implemented the existing ones.
Adding AngularMaterialModule
From Solution Explorer, navigate to the /src/app/
folder, create a new angular-material.module.ts
file, and fill it with the following content:
import { NgModule } from '@angular/core';
import { MatButtonModule } from '@angular/material/button';
import { MatIconModule } from '@angular/material/icon';
import { MatToolbarModule } from '@angular/material/toolbar';
@NgModule({
imports: [
MatButtonModule,
MatIconModule,
MatToolbarModule
],
exports: [
MatButtonModule,
...