Member-only story
Angular Material — Getting Started
3 min readJan 17, 2021
Angular Material is a popular UI framework based on Material Design for Angular.
In this article, we’ll look at how to use Angular Material into our Angular project.
Getting Started
We can install Angular Material into an existing project by running:
ng add @angular/material
Then we run:
ng serve
to serve our app.
Autocomplete
Angular comes with an autocomplete component.
To use it, we write:
app.module.ts
import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';import { AppRoutingModule } from './app-routing.module';
import { AppComponent } from './app.component';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
import { MatAutocompleteModule } from '@angular/material/autocomplete';
import { MatFormFieldModule } from '@angular/material/form-field';
import { MatInputModule } from '@angular/material/input';@NgModule({
declarations: [
AppComponent
],
imports: [
BrowserModule…