Behebung von Angular 'Cannot find control with unspecified name attribute'
English
Deutsch
Problem:
In deiner Angular2/4/5-Anwendung siehst du diese Fehlermeldung:
angular_error.txt
Cannot find control with unspecified name attributeLösung
Suche nach einer Anweisung im HTML-Angular-Template wie dieser:
template_example.html
[formControl]="myCtrl"Die Fehlermeldung bedeutet, dass myCtrl nicht gefunden werden kann. Prüfe, ob diese Variable in deiner Klasse vorhanden ist — sie muss ein FormControl sein, das du aus @angular/forms importieren kannst:
import_formcontrol.ts
import { FormControl } from '@angular/forms';In meinem Fall hat die Änderung auf
template_fixed.html
[formControl]="myControl"das Problem behoben
Check out similar posts by category:
Angular, Javascript, Typescript
If this post helped you, please consider buying me a coffee or donating via PayPal to support research & publishing of new posts on TechOverflow