You have just migrated an existing component to "Standalone" mode, or perhaps you are spinning up a fresh component in Angular 17+. You add a simple input field, bind it with [(ngModel)] , and your application crashes. The console throws the infamous error: Can't bind to 'ngModel' since it isn't a known property of 'input'. This error is the most common friction point for developers adopting the Standalone Component architecture. It occurs because the mental model for dependency management has shifted from implicit (Module-based) to explicit (Component-based). Here is the immediate technical solution, followed by the architectural root cause and edge cases regarding ReactiveFormsModule and CommonModule . The Immediate Fix To resolve this error, you must explicitly import FormsModule into the imports array of your standalone component's metadata. In the legacy NgModule architecture, you likely imported FormsModule ...
Practical programming blog with step-by-step tutorials, production-ready code, performance and security tips, and API/AI integration guides. Coverage: Next.js, React, Angular, Node.js, Python, Java, .NET, SQL/NoSQL, GraphQL, Docker, Kubernetes, CI/CD, cloud (Amazon AWS, Microsoft Azure, Google Cloud) and AI APIs (OpenAI, ChatGPT, Anthropic, Claude, DeepSeek, Google Gemini, Qwen AI, Perplexity AI. Grok AI, Meta AI). Fast, high-value solutions for developers.