javascript - Can't use angular 'mat-form-field' inside custom angular component - TagMerge
1Can't use angular 'mat-form-field' inside custom angular componentCan't use angular 'mat-form-field' inside custom angular component

Can't use angular 'mat-form-field' inside custom angular component

Asked 1 years ago
0
1 answers

You need to import MatFormFieldModule in the module where the TagListComponent is declared (ie - SharedModule)

import {MatFormFieldModule} from '@angular/material/form-field';

@NgModule({
    declarations: [
        ...
        TagListComponent,
    ],
    imports: [
       ...
       MatFormFieldModule
    ],
    exports: [
        ...
        TagListComponent
    ],
    providers: [
        ...
    ],
})
export class SharedModule { }

Source: link

Recent Questions on javascript

    Programming Languages