"mat-label" is not a known element. Bug in Latest Angular Material

In my Angular, an error was received:

compiler.js:466 Uncaught Error: Template parse errors: 'mat-label' is not a known element: 1. If 'mat-label' is an Angular component, then verify that it is part of this module. 2. If 'mat-label' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message. (" </mat-form-field> <mat-form-field> [ERROR ->]<mat-label>Both a label and a placeholder</mat-label> <input matInput placeholder="Simple"): 

Question:

The material label is under MatFormFieldModule. Here is the link.

Now, what is the possible cause of the problem, why the Mat-Label is unknown to Angular Material.

Here is the HTML

 <mat-form-field> <mat-label>Both a label and a placeholder</mat-label> <input matInput placeholder="Simple placeholder"> </mat-form-field> 
+5
source share
1 answer

Update @ angular / stuff to "5.2.0" and the problem goes away.

0
source

Source: https://habr.com/ru/post/1274162/


All Articles