Avatar ·

त्रुटि: Angular Material में 'input' की ज्ञात प्रॉपर्टी नहीं होने के कारण 'formControl' से बाइंड नहीं कर सकता

सभी को नमस्ते! मैं Angular और TypeScript में नौसिखिया हूँ, और Angular Material से ऑटोकम्प्लीट का उपयोग करने की कोशिश करते समय मुझे एक समस्या आई। मैंने एक इनपुट फील्ड वाला कम्पोनेंट बनाया और फॉर्म की स्थिति को प्रबंधित करने के लिए उसमें `formControl` बाइंड करना चाहता हूँ। यहाँ मेरा कोड है: **app.component.ts:** ```typescript import { Component, OnInit } from '@angular/core'; import { FormControl } from '@angular/forms'; @Component({ selector: 'app-root', templateUrl: './app.component.html', styleUrls: ['./app.component.css'] }) export class AppComponent implements OnInit { myControl = new FormControl(''); options: string[] = ['One', 'Two', 'Three']; ngOnInit() {} } ``` **app.component.html:** ```html {{ option }} ```