title: AngularJS input states not working in asp
body: <pre><code>&lt;%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Login.aspx.cs" Inherits="Staffing_Tool.Login" %&gt;
  
  &lt;!DOCTYPE html&gt;
  
  &lt;html&gt;
  &lt;head runat="server"&gt;
      &lt;script src="scripts/angular.min.js" type="text/javascript"&gt;&lt;/script&gt;
      &lt;link href="Styles/Login.css" rel="stylesheet" /&gt;
      &lt;title&gt;Login&lt;/title&gt;
  &lt;/head&gt;
  &lt;body data-ng-app=""&gt;
      &lt;form runat="server" name="myForm" novalidate&gt;
          &lt;div class="circle logo"&gt;
              &lt;span&gt;&lt;/span&gt;&lt;p&gt;Welcome&lt;br/&gt;to&lt;br/&gt;MCBC Staffing Tool&lt;/p&gt;
          &lt;/div&gt;
          &lt;div class="loginForm"&gt;
              &lt;h4&gt; Login Information&lt;/h4&gt;
              &lt;input type="text" class="text" name="userName" placeholder="Enter Username" data-ng-model="userName" required/&gt;
              &lt;span data-ng-show="myForm.userName.$touched &amp;&amp; myForm.userName.$invalid"&gt;Username is required.&lt;/span&gt;
              &lt;input type="password" name="password" class="text" placeholder="Enter Password" data-ng-model="password" required/&gt;
              &lt;span data-ng-show="myForm.password.$touched &amp;&amp; myForm.password.$invalid"&gt;Password is required.&lt;/span&gt;
              &lt;a href="#"&gt;Forgot your password?&lt;/a&gt;
              &lt;asp:Button ID="btnLogin" runat="server" CssClass="btn blue animate" Text="Log in"&gt;&lt;/asp:Button&gt;
          &lt;/div&gt;
      &lt;/form&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>I am new to angularJS, and above is a simple login form I have created in asp.
  Everything is working fine but error span for input fields are not working.</p>
  
  <p>First I thought, angularJS itself is not working so I added a h1 tag as follows after my userName field to test that:</p>
  
  <pre><code>&lt;h1&gt;{{userName}}&lt;/h1&gt;
  </code></pre>
  
  <p>And its showing the value typed in the field.</p>
  
  <p>Then I tried following:</p>
  
  <pre><code>&lt;h1&gt;{{myForm.userName.$valid}}&lt;/h1&gt;
  </code></pre>
  
  <p>But it's not showing anything.</p>
  
  <p>Then I tried placing the html part of my code (leaving the first line), in a simple .html file and ran it, and everything worked smoothly.</p>
  
  <p>Please let me know why its not working in .aspx file.</p>