<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
<channel>
<title>Coder Legion - Recent posts tagged input</title>
<link>https://coderlegion.com/tag/input</link>
<description>Powered by Question2Answer</description>
<item>
<title>Understanding ReLU activation function for Neural Network</title>
<link>https://coderlegion.com/22514/understanding-relu-activation-function-for-neural-network</link>
<description>
&lt;p&gt;Hello, I'm Ganesh. I'm building &lt;em&gt;git-lrc&lt;/em&gt;, an AI code reviewer that runs on every commit. It is free, unlimited, and source-available on Github. &lt;a href=&quot;https://github.com/HexmosTech/git-lrc&quot; rel=&quot;noopener noreferrer nofollow&quot;&gt;Star git-lrc on GitHub&lt;/a&gt; to help more developers discover the project. Do give it a try and share your feedback for improving the product.&lt;/p&gt;

&lt;p&gt;In the previous article, we discussed how backpropagation actually works. We also calculated weight and bias for all the layers.&lt;br&gt;
We used soft plus activation function for our small neural network.&lt;/p&gt;

&lt;p&gt;Now in this article let's use ReLU function for the neural network.&lt;/p&gt;

&lt;h2&gt;
  
  
  Defination of ReLU
&lt;/h2&gt;

&lt;p&gt;It is a function which will return the input if the input is positive otherwise it will return 0.&lt;/p&gt;

&lt;p&gt;f(x) = max(0,x)&lt;/p&gt;

&lt;p&gt;In normal expression&lt;/p&gt;

&lt;p&gt;f(x) = 1 if x &amp;gt; 0 &lt;br&gt;
       0 if x &amp;lt;=0&lt;/p&gt;

&lt;h2&gt;
  
  
  Using ReLU in Neural Network
&lt;/h2&gt;

&lt;p&gt;For First Layer we can calculate.&lt;/p&gt;

&lt;p&gt;As we use 2 hidden neurons in the first layer we have to calculate for both the neurons separately.&lt;/p&gt;

&lt;p&gt;x1 = ( input x weight1 ) + bias1&lt;br&gt;
y1 = ReLu(x1)&lt;/p&gt;

&lt;p&gt;Similarly calculating for second hidden neuron.&lt;/p&gt;

&lt;p&gt;x2 = ( input x weight2 ) + bias2&lt;br&gt;
y2 = ReLu(x2)&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;From both equation we can calulate the outputs of first layer and can pass it to the second layer.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://github.com/HexmosTech/git-lrc&quot; rel=&quot;noopener noreferrer nofollow&quot;&gt;&lt;img src=&quot;https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fnuphqwcp6bha9ol6pdo3.png&quot; alt=&quot;git-lrc&quot; width=&quot;360&quot; height=&quot;540&quot;&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Any feedback or contributors are welcome! It&amp;rsquo;s online, source-available, and ready for anyone to use.&lt;/p&gt;

&lt;p&gt;&amp;#11088; &lt;a href=&quot;https://github.com/HexmosTech/git-lrc?utm_source=chatgpt.com&quot; rel=&quot;noopener noreferrer nofollow&quot;&gt;Star git-lrc on GitHub&lt;/a&gt;&lt;/p&gt;
</description>
<category>Other</category>
<guid isPermaLink="true">https://coderlegion.com/22514/understanding-relu-activation-function-for-neural-network</guid>
<pubDate>Thu, 16 Jul 2026 04:34:38 +0000</pubDate>
</item>
<item>
<title>Introduction to Neural Networks</title>
<link>https://coderlegion.com/18993/introduction-to-neural-networks</link>
<description>
&lt;p&gt;Hello, I'm Ganesh. I'm building &lt;em&gt;git-lrc&lt;/em&gt;, a free, micro AI code review that runs on commit. It is free, and source-available on GitHub. &lt;a href=&quot;https://github.com/HexmosTech/git-lrc&quot; rel=&quot;noopener noreferrer nofollow&quot;&gt;Star Us&lt;/a&gt; to help devs discover the project. Do give it a try and share your feedback for improving the product.&lt;/p&gt;

&lt;p&gt;In this series of articles, we will explore the world of neural networks and how they work.&lt;/p&gt;

&lt;p&gt;In this article, we will discuss the fundamental idea of neural networks.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is a Neural Network?
&lt;/h2&gt;

&lt;p&gt;A neural network is a computational model that is inspired by the structure and function of the human brain.&lt;/p&gt;

&lt;p&gt;It is widely used in many fields like image recognition, natural language processing, etc.&lt;br&gt;
It is most popular machine learning algorithm.&lt;/p&gt;

&lt;p&gt;Simplest image of a Neural Network is : &lt;br&gt;
&lt;a rel=&quot;nofollow&quot; href=&quot;https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhaprkizrj1f1xwo02kkj.png&quot; class=&quot;article-body-image-wrapper&quot;&gt;&lt;img src=&quot;https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhaprkizrj1f1xwo02kkj.png&quot; alt=&quot;&quot; width=&quot;330&quot; height=&quot;397&quot;&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What Neural Networks Manily Do?
&lt;/h2&gt;

&lt;p&gt;It tries to approximate the function of the given input and map it to the output.&lt;/p&gt;

&lt;p&gt;In simple terms, it tries to learn the relationship between the input and output. It approximates the output based on the input data.&lt;/p&gt;

&lt;p&gt;This will be be done with basic mathematical functions which totaly changes based on the data we provided.&lt;/p&gt;

&lt;p&gt;For example:&lt;/p&gt;

&lt;p&gt;Let's take example of Drug which can cure illness.&lt;/p&gt;

&lt;p&gt;Now let's split the gruop of people based on dosage of drug they consume.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Low dosage: Group A&lt;/li&gt;
&lt;li&gt;Medium dosage: Group B&lt;/li&gt;
&lt;li&gt;High dosage: Group C&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Most Commonly Gruop results may be ploted as this in the graph.&lt;/p&gt;

&lt;p&gt;&lt;a rel=&quot;nofollow&quot; href=&quot;https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ftg23g1z0ntul0hi07cs1.png&quot; class=&quot;article-body-image-wrapper&quot;&gt;&lt;img src=&quot;https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ftg23g1z0ntul0hi07cs1.png&quot; alt=&quot;&quot; width=&quot;800&quot; height=&quot;667&quot;&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;To predict the efficacy of the dosage of drug we can't simply use simple straight line or normal distribution.&lt;/p&gt;

&lt;p&gt;As for example I ploted this graph for understaning on how it is done.&lt;/p&gt;

&lt;p&gt;&lt;a rel=&quot;nofollow&quot; href=&quot;https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5olh58w96ga2ebnxc943.png&quot; class=&quot;article-body-image-wrapper&quot;&gt;&lt;img src=&quot;https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5olh58w96ga2ebnxc943.png&quot; alt=&quot;&quot; width=&quot;800&quot; height=&quot;667&quot;&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This is where nerual network will help.&lt;/p&gt;

&lt;p&gt;If we have data points in different location it will find and draw a line to predict the values between the points.&lt;/p&gt;

&lt;p&gt;&lt;a rel=&quot;nofollow&quot; href=&quot;https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fgjwhimdcs5lawom60bb7.png&quot; class=&quot;article-body-image-wrapper&quot;&gt;&lt;img src=&quot;https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fgjwhimdcs5lawom60bb7.png&quot; alt=&quot;&quot; width=&quot;800&quot; height=&quot;667&quot;&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;By above graph we can able to understand what neural network can do.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;Neural Network is the best tool to fit the data points which are scattered with curve which we can use it to predict the values in between the data points.&lt;/p&gt;

&lt;p&gt;We got to know with basic example what it actualy do.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://github.com/HexmosTech/git-lrc&quot; rel=&quot;noopener noreferrer nofollow&quot;&gt;&lt;img src=&quot;https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fabn6nl3iehrohehnxgje.png&quot; alt=&quot;git-lrc&quot; width=&quot;800&quot; height=&quot;373&quot;&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Any feedback or contributors are welcome! It&amp;rsquo;s online, source-available, and ready for anyone to use. &lt;br&gt;
&amp;#11088; Star it on GitHub: &lt;a href=&quot;https://github.com/HexmosTech/git-lrc&quot; rel=&quot;noopener noreferrer nofollow&quot;&gt;https://github.com/HexmosTech/git-lrc&lt;/a&gt;&lt;/p&gt;


</description>
<category>Other</category>
<guid isPermaLink="true">https://coderlegion.com/18993/introduction-to-neural-networks</guid>
<pubDate>Sun, 31 May 2026 18:12:12 +0000</pubDate>
</item>
<item>
<title>Attention Is All You Need - Part 1</title>
<link>https://coderlegion.com/16111/attention-is-all-you-need-part-1</link>
<description>
&lt;p&gt;Hello, I'm Ganesh. I'm building &lt;em&gt;git-lrc&lt;/em&gt;, an AI code reviewer that runs on every commit. It is free, unlimited, and source-available on Github. &lt;a href=&quot;https://github.com/HexmosTech/git-lrc&quot; rel=&quot;noopener noreferrer nofollow&quot;&gt;Star Us&lt;/a&gt; to help devs discover the project. Do give it a try and share your feedback for improving the product.&lt;/p&gt;

&lt;p&gt;I will going to discuss about the paper &lt;strong&gt;&quot;Attention Is All You Need&quot;&lt;/strong&gt;  which introduced the Transformer architecture in 2017 and it has become one of the most important models in the field of NLP.&lt;/p&gt;

&lt;p&gt;This paper was published in 2017 by Google researchers.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is Background?
&lt;/h2&gt;

&lt;p&gt;The Goal of Machine Learning is to learn mapping from input to output.&lt;/p&gt;

&lt;p&gt;For example:&lt;br&gt;
Predicting house price based on sqft was based on bedrooms, bathrooms, locality, etc&lt;/p&gt;

&lt;p&gt;In email spam detection, the input is email text and the output is spam or not spam.&lt;/p&gt;

&lt;p&gt;This were mapped through neural networks.&lt;/p&gt;

&lt;p&gt;Neural networks is sequence of layers each transforming an input to output of previous layer.&lt;/p&gt;

&lt;p&gt;But this had a major limitation that it was not able to capture the long range dependencies in the input.&lt;/p&gt;

&lt;h2&gt;
  
  
  What problem they solved?
&lt;/h2&gt;

&lt;p&gt;The earlier models were based on Recurrent Neural Networks (RNNs) processed one token per time step.&lt;/p&gt;

&lt;p&gt;Which mainly had two problems:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;It was not able to capture the long range dependencies in the input.&lt;/li&gt;
&lt;li&gt;It was not able to process the input in parallel. As it was only depended on sequential information.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  How this was solved?
&lt;/h2&gt;

&lt;p&gt;Transformer architecture was introduced to solve this problem.&lt;/p&gt;

&lt;p&gt;It is based on attention mechanism.&lt;/p&gt;

&lt;p&gt;Which allows the model to focus on the most relevant parts of the input sequence.&lt;/p&gt;

&lt;p&gt;This is simple explaination for now I will conclude and wrap it up for this article.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;In this article, we discussed the background of the Attention Is All You Need paper and the problem it solved.&lt;/p&gt;

&lt;p&gt;In the next article, we will discuss the Transformer architecture in detail with an example.&lt;/p&gt;

&lt;p&gt;Reference: &lt;a href=&quot;https://proceedings.neurips.cc/paper_files/paper/2017/file/3f5ee243547dee91fbd053c1c4a845aa-Paper.pdf&quot; rel=&quot;noopener noreferrer nofollow&quot;&gt;https://proceedings.neurips.cc/paper_files/paper/2017/file/3f5ee243547dee91fbd053c1c4a845aa-Paper.pdf&lt;/a&gt; &lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://github.com/HexmosTech/git-lrc&quot; rel=&quot;noopener noreferrer nofollow&quot;&gt;&lt;img src=&quot;https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fabn6nl3iehrohehnxgje.png&quot; alt=&quot;git-lrc&quot; width=&quot;800&quot; height=&quot;373&quot;&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Any feedback or contributors are welcome! It&amp;rsquo;s online, source-available, and ready for anyone to use. &lt;br&gt;
&amp;#11088; Star it on GitHub: &lt;a href=&quot;https://github.com/HexmosTech/git-lrc&quot; rel=&quot;noopener noreferrer nofollow&quot;&gt;https://github.com/HexmosTech/git-lrc&lt;/a&gt;&lt;/p&gt;


</description>
<category>Other</category>
<guid isPermaLink="true">https://coderlegion.com/16111/attention-is-all-you-need-part-1</guid>
<pubDate>Wed, 29 Apr 2026 18:29:39 +0000</pubDate>
</item>
<item>
<title>Can't bind to 'ngmodel' since it isn't a known property of 'input'</title>
<link>https://coderlegion.com/5788/cant-bind-to-ngmodel-since-it-isnt-a-known-property-of-input</link>
<description>&lt;p&gt;&lt;strong&gt;Today, we'll discuss about the common error in Angular: &lt;span style=&quot;color: rgb(185, 106, 217);&quot;&gt;&lt;em&gt;Can't bind to 'ngmodel' since it isn't a known property of 'input'&lt;/em&gt;&lt;/span&gt;. The error will occur when we tend to use the &lt;em&gt;&lt;a rel=&quot;nofollow&quot; href=&quot;https://angular.io/guide/two-way-binding&quot; target=&quot;_blank&quot;&gt;two-way data binding&lt;/a&gt;&lt;/em&gt; using 'ngModel' in our input tag. Well, there's a very simple and quick fix to this error, just by importing the &lt;span style=&quot;color: rgb(185, 106, 217);&quot;&gt;&quot;FormsModule&quot;&lt;/span&gt; module in our app.module.ts. Let's go through this blog to see how it works.
  &lt;/strong&gt;&lt;/p&gt;
&lt;div id=&quot;toc-div&quot;&gt;
  &lt;h4&gt;&lt;span style=&quot;font-family: arial,helvetica,sans-serif;&quot;&gt;&lt;strong&gt; Table of Contents: &lt;a id=&quot;toc-toogle&quot; class=&quot;open&quot;&gt;&lt;/a&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/h4&gt;
  &lt;div id=&quot;toc-list&quot;&gt;
    &lt;ol&gt;
      &lt;li&gt;&lt;a rel=&quot;nofollow&quot; href=&quot;#_Toc123774610&quot;&gt;&lt;span style=&quot;font-family: arial,helvetica,sans-serif;&quot;&gt;What is &quot;Can't bind to 'ngmodel' since it isn't a known property of 'input'&quot;&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
      &lt;li&gt;&lt;a rel=&quot;nofollow&quot; href=&quot;#_Toc123774611&quot;&gt;&lt;span style=&quot;font-family: arial,helvetica,sans-serif;&quot;&gt;Causes&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
      &lt;li&gt;&lt;a rel=&quot;nofollow&quot; href=&quot;#_Toc123774612&quot;&gt;&lt;span style=&quot;font-family: arial,helvetica,sans-serif;&quot;&gt;Solution&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
      &lt;li&gt;&lt;a rel=&quot;nofollow&quot; href=&quot;#_Toc123774613&quot;&gt;&lt;span style=&quot;font-family: arial,helvetica,sans-serif;&quot;&gt;The Conclusion&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
      &lt;li&gt;&lt;a rel=&quot;nofollow&quot; href=&quot;#_Toc123774614&quot;&gt;&lt;span style=&quot;font-family: arial,helvetica,sans-serif;&quot;&gt;&lt;span style=&quot;font-family: arial,helvetica,sans-serif;&quot;&gt;The Reference&lt;/span&gt;&lt;/span&gt;&lt;br&gt;&lt;/a&gt;&lt;/li&gt;
    &lt;/ol&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;section&gt;
  &lt;h2&gt;&lt;a class=&quot;custom_anchor&quot; name=&quot;_Toc123774610&quot; id=&quot;_Toc123774610&quot;&gt;&lt;/a&gt;&lt;strong&gt;&lt;span style=&quot;font-family: arial, helvetica, sans-serif;&quot;&gt;What is &quot;Can't bind to 'ngmodel' since it isn't a known property of 'input'&quot;&lt;/span&gt; &lt;a id=&quot;TypeError-str-object&quot; style=&quot;color: blue;&quot; rel=&quot;nofollow&quot; href=&quot;#_Toc123774610&quot;&gt;#&lt;/a&gt;&lt;/strong&gt;&lt;/h2&gt;
  &lt;p&gt;&lt;span style=&quot;font-family: arial, helvetica, sans-serif;&quot;&gt;As we mentioned above, this error occurs when we try to use &lt;em style=&quot;background-color: rgb(206, 212, 217); color: rgb(0, 0, 0);&quot;&gt;ngModel&lt;/em&gt; with the input tag but we didn't not import it in our Angular &lt;em style=&quot;background-color: rgb(206, 212, 217); color: rgb(0, 0, 0);&quot;&gt;app.module.ts&lt;/em&gt;. Let's look at the example below:&lt;/span&gt;&lt;/p&gt;
  &lt;p&gt;&lt;span style=&quot;font-family: arial, helvetica, sans-serif;&quot;&gt;In &lt;em style=&quot;background-color: rgb(206, 212, 217); color: rgb(0, 0, 0);&quot;&gt;component.html&lt;/em&gt;&lt;/span&gt;&lt;/p&gt;
  &lt;pre&gt;&lt;code&gt;&lt;span style=&quot;font-family: arial,helvetica,sans-serif;&quot;&gt;
  &lt;input type=&quot;text&quot;&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;  &lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: arial, helvetica, sans-serif;&quot;&gt;In &lt;em style=&quot;background-color: rgb(206, 212, 217); color: rgb(0, 0, 0);&quot;&gt;component.ts&lt;/em&gt;&lt;/span&gt;&lt;/p&gt;&lt;br&gt;
  &lt;pre&gt;&lt;code&gt;&lt;span style=&quot;font-family: arial,helvetica,sans-serif;&quot;&gt;&lt;br&gt;
  name: string =  &quot;&quot;;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;
  &lt;p&gt;&lt;span style=&quot;font-family: arial, helvetica, sans-serif;&quot;&gt;This is the error:&lt;/span&gt;&lt;/p&gt;&lt;br&gt;
  &lt;pre&gt;&lt;code&gt;&lt;span style=&quot;font-family: arial,helvetica,sans-serif; color: rgb(224, 62, 45);&quot;&gt;&lt;em&gt;&lt;strong&gt;&lt;br&gt;
  Can't bind to 'ngModel' since it isn't a known property of 'input'.ngtsc(-998002)&lt;/strong&gt;&lt;/em&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;
&lt;div class=&quot;div-pink&quot;&gt;&lt;br&gt;
&lt;span class=&quot;alert-header&quot;&gt;Caution&lt;/span&gt;&lt;br&gt;
&lt;span class=&quot;alert-body&quot;&gt; Can't bind to 'ngModel' since it isn't a known property of 'input'.ngtsc(-998002)&lt;/span&gt;&lt;br&gt;
&lt;/div&gt;&lt;br&gt;
  &lt;p&gt;&lt;span style=&quot;font-family: arial, helvetica, sans-serif;&quot;&gt;From above example, you may see that we're using two-way data binding (put a banana in a box) which bind between &lt;input&gt; and &quot;name&quot; property in the ts file. The logic and syntax is exactly corerct, but why this error still happens? Let's move to the next section.&lt;/span&gt;&lt;/p&gt;&lt;br&gt;
&lt;/section&gt;
&lt;section&gt;
  &lt;h2&gt;&lt;a class=&quot;custom_anchor&quot; name=&quot;_Toc123774611&quot; id=&quot;_Toc123774611&quot;&gt;&lt;/a&gt;&lt;strong&gt;&lt;span style=&quot;font-family: arial, helvetica, sans-serif;&quot;&gt;Causes&lt;/span&gt; &lt;a style=&quot;color: blue;&quot; rel=&quot;nofollow&quot; href=&quot;#_Toc123774611&quot;&gt;#&lt;/a&gt;&lt;/strong&gt;&lt;/h2&gt;
  &lt;p&gt;&lt;span style=&quot;font-family: arial, helvetica, sans-serif;&quot;&gt;Actually, &lt;em style=&quot;background-color: rgb(206, 212, 217); color: rgb(0, 0, 0);&quot;&gt;ngModel&lt;/em&gt; is a directive in &lt;em style=&quot;background-color: rgb(206, 212, 217); color: rgb(0, 0, 0);&quot;&gt;FormsModule&lt;/em&gt; in Angular. If we didn't import it in our &lt;em style=&quot;background-color: rgb(206, 212, 217); color: rgb(0, 0, 0);&quot;&gt;app.module.ts&lt;/em&gt;, it means that we're not authorized to use &lt;em style=&quot;background-color: rgb(206, 212, 217); color: rgb(0, 0, 0);&quot;&gt;ngModel&lt;/em&gt; throughout our Angular application. This is the reason why &lt;em style=&quot;background-color: rgb(206, 212, 217); color: rgb(0, 0, 0);&quot;&gt;ngModel&lt;/em&gt; is not recognized in our &lt;input&gt; even we're using it correctly. Therefore, we must tell our Angular application that &lt;em style=&quot;background-color: rgb(206, 212, 217); color: rgb(0, 0, 0);&quot;&gt;ngModel&lt;/em&gt; is actually a part of our aplication. So how? Let's continue exploring.&lt;/span&gt;&lt;/p&gt;
&lt;/section&gt;
&lt;section&gt;
  &lt;h2&gt;&lt;a class=&quot;custom_anchor&quot; name=&quot;_Toc123774612&quot; id=&quot;_Toc123774612&quot;&gt;&lt;/a&gt;&lt;strong&gt;&lt;span style=&quot;font-family: arial, helvetica, sans-serif;&quot;&gt;Solution&lt;/span&gt; &lt;a style=&quot;color: blue;&quot; rel=&quot;nofollow&quot; href=&quot;#_Toc123774612&quot;&gt;#&lt;/a&gt;&lt;/strong&gt;&lt;/h2&gt;
  &lt;p&gt;&lt;span style=&quot;font-family: arial, helvetica, sans-serif;&quot;&gt;First, go to your &lt;em style=&quot;background-color: rgb(206, 212, 217); color: rgb(0, 0, 0);&quot;&gt;app.module.ts:&lt;/em&gt;&lt;/span&gt;&lt;/p&gt;
  &lt;pre&gt;&lt;code&gt;&lt;span style=&quot;font-family: arial,helvetica,sans-serif;&quot;&gt;
import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';

import { AppRoutingModule } from './app-routing.module';
import { AppComponent } from './app.component';

@NgModule({
  declarations: [
    AppComponent
  ],
  imports: [
    BrowserModule,
    AppRoutingModule
  ],
  providers: [],
  bootstrap: [AppComponent]
})

export class AppModule { }&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
  &lt;p&gt;&lt;span style=&quot;font-family: arial, helvetica, sans-serif;&quot;&gt;Next, import the &lt;em style=&quot;background-color: rgb(206, 212, 217); color: rgb(0, 0, 0);&quot;&gt;FormsModule&lt;/em&gt; in your &lt;em style=&quot;background-color: rgb(206, 212, 217); color: rgb(0, 0, 0);&quot;&gt;app.module.ts: &lt;/em&gt;&lt;/span&gt;&lt;/p&gt;
  &lt;pre&gt;&lt;code&gt;&lt;span style=&quot;font-family: arial,helvetica,sans-serif;&quot;&gt;
  import { FormsModule } from '@angular/forms';&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
  &lt;p&gt;&lt;span style=&quot;font-family: arial, helvetica, sans-serif;&quot;&gt;Finally, put the &lt;em style=&quot;background-color: rgb(206, 212, 217); color: rgb(0, 0, 0);&quot;&gt;FormsModule&lt;/em&gt; in &lt;em style=&quot;background-color: rgb(206, 212, 217); color: rgb(0, 0, 0);&quot;&gt;imports: [ ]&lt;/em&gt; of the &lt;em style=&quot;background-color: rgb(206, 212, 217); color: rgb(0, 0, 0);&quot;&gt;@NgModule&lt;/em&gt; directive:&lt;/span&gt;&lt;/p&gt;
  &lt;pre&gt;&lt;code&gt;&lt;span style=&quot;font-family: arial,helvetica,sans-serif;&quot;&gt;
  imports: [
    BrowserModule,
    AppRoutingModule,
    FormsModule
  ],
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
  &lt;p&gt;&lt;span style=&quot;font-family: arial, helvetica, sans-serif;&quot;&gt;With these, we're telling our Angular application that &lt;em style=&quot;background-color: rgb(206, 212, 217); color: rgb(0, 0, 0);&quot;&gt;FormsModule&lt;/em&gt; is our part of member, and we can use the directives provided by it, such as &lt;em style=&quot;background-color: rgb(206, 212, 217); color: rgb(0, 0, 0);&quot;&gt;ngModel&lt;/em&gt;. After this, you may see the error disappears and you can continue building your application or use &lt;em style=&quot;background-color: rgb(206, 212, 217); color: rgb(0, 0, 0);&quot;&gt;ngModel&lt;/em&gt; anywhere in your components for two-way data binding!&lt;/span&gt;&lt;/p&gt;
&lt;/section&gt;
&lt;section&gt;
  &lt;h2&gt;&lt;a class=&quot;custom_anchor&quot; name=&quot;_Toc123774613&quot; id=&quot;_Toc123774613&quot;&gt;&lt;/a&gt;&lt;strong&gt;&lt;span style=&quot;font-family: arial, helvetica, sans-serif;&quot;&gt;The Conclusion&lt;/span&gt; &lt;a style=&quot;color: blue;&quot; rel=&quot;nofollow&quot; href=&quot;#_Toc123774613&quot;&gt;#&lt;/a&gt;&lt;/strong&gt;&lt;/h2&gt;
  &lt;p&gt;&lt;span style=&quot;font-family: arial, helvetica, sans-serif;&quot;&gt;Great, you must be able to solve this simple error after going through this study blog. In this blog, we've learned what is &lt;span style=&quot;color: rgb(185, 106, 217);&quot;&gt;&lt;em&gt;Can't bind to 'ngmodel' since it isn't a known property of 'input'&lt;/em&gt;&lt;/span&gt;, its causes and the solution to fix it. Hope your guys enjoy this tutorial and find it helpful. Thanks :) &lt;/span&gt;&lt;/p&gt;
&lt;/section&gt;
&lt;section&gt;
  &lt;h2&gt;&lt;a class=&quot;custom_anchor&quot; name=&quot;_Toc123774614&quot; id=&quot;_Toc123774614&quot;&gt;&lt;/a&gt;&lt;strong&gt;&lt;span style=&quot;font-family: arial, helvetica, sans-serif;&quot;&gt;The Reference&lt;/span&gt; &lt;a style=&quot;color: blue;&quot; rel=&quot;nofollow&quot; href=&quot;#_Toc123774614&quot;&gt;#&lt;/a&gt;&lt;/strong&gt;&lt;/h2&gt;
  &lt;p&gt;&lt;span style=&quot;font-family: arial, helvetica, sans-serif;&quot;&gt;For further information, you may visit these links:&lt;/span&gt;&lt;/p&gt;
  &lt;ol&gt;
    &lt;li&gt;&lt;em&gt;&lt;span style=&quot;font-family: arial, helvetica, sans-serif;&quot;&gt;Two-Way Data Binding: &lt;/span&gt;&lt;a rel=&quot;nofollow&quot; href=&quot;https://angular.io/guide/two-way-binding&quot; target=&quot;_blank&quot;&gt;https://angular.io/guide/two-way-binding&lt;/a&gt;&lt;/em&gt;&lt;/li&gt;
    &lt;li&gt;&lt;em&gt;&lt;span style=&quot;font-family: arial, helvetica, sans-serif;&quot;&gt;NgModel: &lt;/span&gt;&lt;a rel=&quot;nofollow&quot; href=&quot;https://angular.io/api/forms/NgModel&quot; target=&quot;_blank&quot;&gt;https://angular.io/api/forms/NgModel&lt;/a&gt;&lt;/em&gt;&lt;/li&gt;
  &lt;/ol&gt;
&lt;/section&gt;
</description>
<category>JavaScript</category>
<guid isPermaLink="true">https://coderlegion.com/5788/cant-bind-to-ngmodel-since-it-isnt-a-known-property-of-input</guid>
<pubDate>Mon, 29 Sep 2025 23:42:57 +0000</pubDate>
</item>
</channel>
</rss>