a quick query --
Am using angular-material 8.2.3 in my angular 8 app - getting the following error wrt md-icon.
'md-icon' is not a known element: 1. If 'md-icon' is an Angular component, then verify that it is part of this module.
this html --
<div class="image-picker" (click)="fileInput.click()">
<mat-icon [class.small]="imageUrl">file_upload</mat-icon>
<canvas width="500" height="380" #canvas hidden="true"></canvas>
<input #fileInput type="file" hidden="true" (change)="imageDataChanged($event)">
</div>
I have in my app.module.ts file the following line --
import { MatInputModule, MatButtonModule, MatSelectModule, MatIconModule, MatCardModule } from '@angular/material';
and in imports section MatIconModule
mentioned clearly.
Any clue what's missing or what may be wrong here?? If you observe in the html I pasted, it is mat-icon. Originally that was md-icon
and I changed that to try out. Neither did the trick. I hope I have imported the correct package.
Can you tell me what exactly it is? What did I do incorrect?
My NgModule code --
@NgModule({
declarations: [
AppComponent,
FooterComponent,
BasicLayoutComponent,
LoginComponent,
RegistrationComponent,
CameraSnapshotComponent,
ImagePickerComponent,
BlockUIComponent,
UpdateImageComponent
],
imports: [
BrowserModule,
AppRoutingModule,
FormsModule,
MatInputModule,
MatButtonModule,
MatSelectModule,
MatIconModule,
MatCardModule
],
exports:
[
MatInputModule,
MatButtonModule,
MatSelectModule,
MatIconModule,
MatCardModule
],
providers: [],
bootstrap: [AppComponent]
})