Search
 
SCRIPT & CODE EXAMPLE
 

TYPESCRIPT

mat-form-field must contain a MatFormFieldControl

@NgModule({
    imports: [
        MatInputModule
    ],
    exports: [
        MatInputModule
    ]
})
Comment

mat-form-field must contain a MatFormFieldControl

Maybe you need to close <input> tag:

<!-- Wrong -->
<mat-form-field>
  <input matInput>
</mat-form-field>

<!-- Right -->
<mat-form-field>
  <input matInput />
</mat-form-field>
Comment

mat-form-field must contain a matformfieldcontrol checkbox

The following Angular Material components are designed to work inside a <mat-form-field>:

<input matNativeControl> & <textarea matNativeControl> (version 7 & newer)
<select matNativeControl> (version 7 & newer)
<input matInput> & <textarea matInput> (version 5 & 6)
<mat-select>
<mat-chip-list>
Comment

ERROR Error: mat-form-field must contain a MatFormFieldControl.

Make sure matInput is with lowercase 'm'
I had this error and one of my controls had MatInput instead of matInput

In any case just double check the spelling of your directives and components
Comment

PREVIOUS NEXT
Code Example
Typescript :: Type annotations can only be used in TypeScript files. 
Typescript :: ps1 cannot be loaded because running scripts is disabled on this system. For more information, see about_Execution_Policies at https:/go.microsoft.com/fwlink/?LinkID=135170. 
Typescript :: add google font in tailwind css 
Typescript :: adonis query count 
Typescript :: typescript random int 
Typescript :: stripe typescript 
Typescript :: nextjs global prisma 
Typescript :: adonis query delete 
Typescript :: Nmap to find open ports kali linux 
Typescript :: add to classlist of element in typescript not applied the css styles 
Typescript :: keyboard events pygame 
Typescript :: node fetch exports is not defined 
Typescript :: typescript loop over map with value as array 
Typescript :: typescript key value loop 
Typescript :: ts class static function call inside class extends 
Typescript :: rechartjs yaxis label ticks custom 
Typescript :: mongodb array size greater than 
Typescript :: file_check.ps1 cannot be loaded because running scripts is disabled on this system. 
Typescript :: angular get item from localstorage 
Typescript :: mat-checkbox change 
Typescript :: compare two objects deep 
Typescript :: typescript string contains 
Typescript :: what is test management review 
Typescript :: google charts haxis font size 
Typescript :: typescript how to add a property to an object 
Typescript :: angular forkjoin 
Typescript :: eslint absolute imports error 
Typescript :: custom fonts vue 
Typescript :: Socket.io bad request with response 
Typescript :: reactnative upload image axios 0.66 
ADD CONTENT
Topic
Content
Source link
Name
1+8 =