title: Angular ngApp directive
body: <pre><code>  &lt;div ng-app=""&gt;
      &lt;form&gt;
        First Name: &lt;input type="text" ng-model="firstname"&gt;
      &lt;/form&gt;
      &lt;h1&gt;You entered: {{firstname}}&lt;/h1&gt;
    &lt;/div&gt;
  </code></pre>
  
  <p>The above code will fine. But if the ng-app="" directive if moved to form element then it won't work. Any idea why is this. Why the form element will not take ng-app directive and bootstrap the application.</p>
  
  <pre><code>   // This will not work
      &lt;div&gt;
      &lt;form ng-app=""&gt;
         First Name: &lt;input type="text" ng-model="firstname"&gt;
      &lt;/form&gt;
      &lt;h1&gt;You entered: {{firstname}}&lt;/h1&gt;
      &lt;/div&gt;
  </code></pre>
  
  <p>Thanks</p>