title: How to dynamically add input form?
body: <p>I am trying to dynamically add input forms when "New Item" is clicked. But not really know how to write the code in the js part. Any idea?  </p>
  
  <p>Here is my code:  </p>
  
  <pre><code>&lt;!doctype html&gt;
  &lt;html ng-app&gt;
    &lt;head&gt;
      &lt;title&gt;Angular - My Notes&lt;/title&gt;
      &lt;link rel="stylesheet" type="text/css" href="css/index.css"&gt;
  
    &lt;body&gt;
      &lt;h1&gt;My Notes&lt;/h1&gt;
      &lt;div ng-controller="Note"&gt;
        &lt;input type="text" placeholder="Question"&gt;
        &lt;input ng-class="{'blockInput': !inlineChecked}" type="text" placeholder="enter text..."&gt;
        &lt;input type="checkbox" name="check" value="inline" ng-model="inlineChecked"&gt; Inline
        &lt;br&gt;
        &lt;button ng-click="add()"&gt;New Item&lt;/button&gt;
      &lt;/div&gt;
  
      &lt;script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.13/angular.min.js"&gt;&lt;/script&gt;
      &lt;script type="text/javascript"&gt;
  
        var Note = function($scope){
          // create a variable contain new input forms?? 
        }
  
  
      &lt;/script&gt;
    &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>