Encountering an issue while executing karma tests - the error message indicates that 'mat-toolbar' is not a recognized element within the application. Here are some steps to troubleshoot this problem: 1. Confirm whether 'mat-toolbar' is an Angular component and ensure it is included in the current module. 2. If 'mat-toolbar' is a Web Component, consider adding 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress the error message.
import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { FormsModule } from '@angular/forms';
import { AppRoutingModule } from './app-routing.module';
import { AppComponent } from './app.component';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { MaterialModule } from './material.module';
import { MatToolbarModule } from '@angular/material/toolbar';
import { HomeComponent } from './home/home.component';
import { HttpClientModule } from '@angular/common/http';
import { Ng2SearchPipeModule } from 'ng2-search-filter';
import { SearchComponent } from './search/search.component';
@NgModule({
declarations: [AppComponent, HomeComponent, SearchComponent, MatToolbarModule],
imports: [
BrowserModule,
AppRoutingModule,
BrowserAnimationsModule,
MaterialModule,
HttpClientModule,
Ng2SearchPipeModule,
FormsModule,
MatToolbarModule
],
providers: [],
bootstrap: [AppComponent]
})
export class AppModule {}