bug
No error
I upgraded from angular 4 to 6
After that when running project I get error:
'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. ("-form-field>
<mat-form-field>
[ERROR ->]<mat-select formControlName="provinceFormControl" placeholder="Provincia" name="country_shipping"
Angular CLI: 6.0.7
Node: 8.11.2
OS: win32 x64
Angular: 6.0.3
... animations, common, compiler, compiler-cli, core, forms
... http, language-service, platform-browser
... platform-browser-dynamic, platform-server, router
@angular-devkit/architect 0.6.7
@angular-devkit/build-angular 0.6.7
@angular-devkit/build-optimizer 0.6.7
@angular-devkit/core 0.6.7
@angular-devkit/schematics 0.6.7
@angular/cdk 6.2.0
@angular/cli 6.0.7
@angular/material 6.2.0
@ngtools/webpack 6.0.7
@schematics/angular 0.6.7
@schematics/update 0.6.7
rxjs 6.2.0
typescript 2.7.2
webpack 4.10.2
I moved every
<mat-select>
inside a
<mat-form-field>
and addedd import for MatFormFieldModule in app.module
You also have to import the MatSelectModule
.
At first that import gave me error, don't know why...now it works
thanks
I used
@crisbeto import MatSelectModule, _where_?
@ORESoftware In app.module.ts file -
@NgModule({
declarations: [
AppComponent
],
imports: [ MatSelectModule ]
This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
_This action has been performed automatically by a bot._
Most helpful comment
You also have to import the
MatSelectModule
.