4
최신 각도 재질 알려진 요소 오류되지 않습니다 :'매트 라벨은'내 코너 재료에 오류가 발생했습니다
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"):
질문 :
재료 레이블 MatFormFieldModule Here's the link에서
입니다 매트 라벨이 앵귤러 재질에 알려지지 않은 이유는 무엇입니까?
다음은 HTML을 "5.2.0"을하고 문제가 사라집니다하는 각도/재료 @
<mat-form-field> <mat-label>Both a label and a placeholder</mat-label> <input matInput placeholder="Simple placeholder"> </mat-form-field>
문제가 중복되어 해결 방법을 찾을 수 없습니다. 사실, 이것은 해결책을 필요로해서는 안됩니다. 그것은 단지 작동해야합니다. https://github.com/angular/material2에서 문제로 게시하십시오. 이미 문제가 있는지 확인하고 수백 가지가 있는지 확인하십시오. – Preston
앱 설정을 확인했고'app.module.ts'에서'CUSTOM_ELEMENTS_SCHEMA'을 (를) 가져오고 있습니까? 이렇게하면 문제가 해결되고 오류가 제거됩니다. @NgModule ({...., schemas : [CUSTOM_ELEMENTS_SCHEMA]})의 @Angel/Core '에서'import {CUSTOM_ELEMENTS_SCHEMA}'다음에'스키마 : [CUSTOM_ELEMENTS_SCHEMA]'@ –
@ k.vincent, 하지만 그렇게해서는 안됩니다. Angular를 업데이트하는 것은 하루 종일 작업입니다. (여러분, 더 잘할 수 있습니다. – greengold