The Angular Router is an optional service that presents a particular component view for a given URL. It is not part of the Angular core. It is in its own library package, @angular/router. Import what you need from it as you would from any other Angular package.
src/app/app.module.ts (import)
import { RouterModule, Routes } from ‘@angular/router’;