title: How get data in controller of both ng-repeat field along with outside ng-repeat field
body: <p>I am working on angular Project.I have two divs. In one div there is dynamic input which generating through ng-repeat. Initially, two input will be available but if the euser clicks on add more than dynamic two input will be generated through ng-repeat  And in another div there is two input type text which is already present there (not generating through ng-repeat).</p>
  
  <p>Problem I am facing is How to take the value of both div input on submit.Pls help me in this how to take all data at once on submit. My code:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>var addnew = angular.module('dump',[]);
  
  addnew.controller('dumpcontroller', function($scope) 
  {
    $scope.choices = [{id: 'choice1'}];
     $scope.addNewChoice = function() {
    var newItemNo = $scope.choices.length+1;
    $scope.choices.push({'id':'choice'+newItemNo});
    };
  
  
     $scope.removeChoice = function() {
        var lastItem = $scope.choices.length-1;
        $scope.choices.splice(lastItem);
     };
    });</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;html&gt;
    &lt;head&gt;
      &lt;script src ="https://ajax.googleapis.com/ajax/libs/angularjs/1.6.1/angular.min.js"&gt;&lt;/script&gt;
    &lt;/head&gt;
  &lt;body ng-app="dump" ng-controller="dumpcontroller"&gt;      
  &lt;div class="divone" data-ng-repeat="choice in choices"&gt; 
      &lt;input type="text" placeholder="Name" ng-model="choice.childname"&gt;
      &lt;input type="text" placeholder="Name" ng-model="choice.childbirth"&gt;
      &lt;button ng-click="removeChoice()"&gt;-&lt;/button&gt; //To remove the field dynamically.
  &lt;/div&gt;
  
   &lt;button class="remove" ng-click="addNewChoice()"&gt;Add more&lt;/button&gt; //To add the more childname and childbirth field.
  
  &lt;div class="divtwo"&gt;
      &lt;input type="text" placeholder="Name" ng-model="choice.firstname"&gt;
     &lt;input type="text" placeholder="Name" ng-model="choice.lastname"&gt;
  &lt;/div&gt;
  
  &lt;button type="button" id="submit" name="submit" ng-click="famupdate(choices)"&gt;Submit&lt;/button&gt;
    
    &lt;/body&gt;
    &lt;/html&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>Now I want to get all details of both div on click in controller.How can I achieve this. Help me out.</p>
  
  <p>Thanking you in anticipation.</p>