As always, we won't be able to use the AuthService unless we add the required reference to the AppModule class. Open the app.module.shared.ts file and update it by adding the following highlighted lines:
[...]import { RouterModule } from '@angular/router';import { AuthService } from './services/auth.service';import { AppComponent } from './components/app/app.component';[...]imports: [ CommonModule, HttpClientModule, FormsModule, ReactiveFormsModule, RouterModule.forRoot([ { path: '', redirectTo: 'home', pathMatch: 'full' }, { path: 'home', component: HomeComponent }, { path: 'quiz/create', component: QuizEditComponent }, { path: 'quiz/edit/:id', component: QuizEditComponent }, { path: 'quiz/:id', component: QuizComponent ...