I want to create a dropdown, for that i need to add < & tags. When i start working on my project then i got this error. I don't understand where am doing wrong. Please correct me where i did mistake.
error NG8001: 'mat-select' is not a known element:
1. If 'mat-select' is an Angular component, then verify that it is part of this module.
2. If 'mat-select' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message.
3 <mat-select>
Here is the code of component.html:
<mat-form-field>
<mat-label>Process Name</mat-label>
<mat-select
name="country names"
(selectionChange)="country_name()"
>
</mat-select>
</mat-form-field>
code of app.module.ts
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 { PracticeComponent } from './practice/practice.component';
import { TopnavComponent } from './practice/topnav/topnav.component';
import { DropdownComponent } from './dropdown/dropdown.component';
import { MatSelectModule} from '@angular/material/select/';
import{MatFormFieldModule} from '@angular/material/form-field'
import{MatInputModule} from '@angular/material/input'
@NgModule({
declarations: [
AppComponent,
PracticeComponent,
TopnavComponent,
DropdownComponent,
MatSelectModule,
MatFormFieldModule,
MatInputModule
],
imports: [
BrowserModule,
AppRoutingModule,
FormsModule,
MatSelectModule,
MatFormFieldModule,
MatInputModule,
],
providers: [],
bootstrap: [AppComponent]
})
export class AppModule { }
code of material.module.ts:
import { NgModule } from '@angular/core';
import { MatSelectModule} from '@angular/material/select/';
import{MatFormFieldModule} from '@angular/material/form-field'
import{MatInputModule} from '@angular/material/input'
@NgModule({
imports: [
MatSelectModule,
MatFormFieldModule,
MatInputModule
],
exports: [
MatSelectModule,
MatFormFieldModule,
MatInputModule
]
})
export class MaterialModule { }
I don't understand, where am doing wrong. I tried every possible solution, but still issue remain the same.