title: Add new text box on click of a button in angular js
body: <p>How do I add new text box when submit button is pushed. This is what I have tried and I know there's some thing wrong. I am still new to angular js.</p>
  
  <p>Example:</p>
  
  <pre><code>&lt;!doctype html&gt;
  &lt;html lang="en"&gt;
      &lt;head&gt;
          &lt;meta charset="UTF-8"&gt;
          &lt;title&gt;Example - example-ngController-production&lt;/title&gt;
          &lt;script src="//ajax.googleapis.com/ajax/libs/angularjs/1.4.0/angular.min.js"&gt;&lt;/script&gt;
          &lt;script&gt;
              angular.module('controllerAsExample', []).controller('SettingsController1', function ($scope) {
  
                  $scope.contacts=[]
                  $scope.addContact = function()
                  {
                    $scope.contact.push({$scope.contact})
                  }
              });
              };
          &lt;/script&gt;
      &lt;/head&gt;
      &lt;body ng-app="controllerAsExample"&gt;
          &lt;div id="ctrl-as-exmpl" ng-controller="SettingsController1"&gt;
  
              &lt;ul&gt;
                  &lt;li ng-repeat="contact in contacts"&gt;
                      &lt;input type="text" ng-model="contact" /&gt;
                  &lt;/li&gt;
                  &lt;li&gt;&lt;button ng-submit="addContact()"&gt;add&lt;/button&gt;&lt;/li&gt;
              &lt;/ul&gt;
          &lt;/div&gt;
      &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>