title: angular ng-repeat on input from json
body: <p>I am trying to pull all the forms for my page from a json object with values to plug into the ng-required, max-values min-values and type fields. But these values aren't being inserted into the dom. How would I go about repeating over a number of input elements and control whether or not they were text boxes or file uploads and whether or not they are required? I did up a fiddle based on what I was hoping to accomoplish but cant figure out why this doesn't work. <a href="http://jsfiddle.net/stephencrane/uwUJ4/" rel="nofollow">see the jsfiddle.</a></p>
  
  <p>HTML</p>
  
  <pre><code>&lt;form novalidate name="form1" ng-controller="step1"&gt;
      &lt;div ng-repeat="field in json"&gt;
          &lt;label&gt;
              {{field.label}}
  
          &lt;/label&gt;
          &lt;input type="field.type" ng-model="field.model"&gt;
      &lt;/div&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>Javascript</p>
  
  <pre><code>function step1($scope) {
  $scope.json = [
      { 
          "error": "Must be more then 3 letters", 
          "label": "store Name 1",
          "model": "storeName"
      },
      {
          "error": "Must be more then 3 letters", 
          "label": "store Name 1",
          "model": "storeName"
      }
  ];
  }
  </code></pre>