title: How to use the same ng-model on multiple elements
body: <p>Completely new to AngularJS, here. I have a page that will have an undefined amount of input boxes that a user will enter tracking numbers in. There could be only 1, or there could be 10.</p>
  
  <p>I need to obtain the data from each input box. I am currently stuck, in that I can't figure out how to get all of the data from all input boxes; I'm only able to get the data from the first.</p>
  
  <p><b>HTML</b></p>
  
  <hr>
  
  <pre><code>&lt;input type="text" class="form-control" ng-model="inBox"&gt;
  &lt;!-- There are buttons and jQuery that will add another one of the 
       same exact input box above onto this page. There might be as many
       as 15 of these input boxes on the page, and I need the values typed
       into each one. --&gt;
  &lt;input type="submit" ng-click="insert()"&gt;
  </code></pre>
  
  <p><b>AngularJS</b></p>
  
  <hr>
  
  <pre><code>var app = angular.module("myApp", []);
  app.controller("mailroomController", function($scope, $http) {
      $scope.insert = function() {
          alert($scope.inBox);
      };
  });
  </code></pre>
  
  <p>What I've tried: I tried googling, with no luck. I've tried replacing <code>$scope.inBox</code> with <code>$scope.inbox[1]</code> or <code>$scope.inbox[2]</code>. No luck.</p>
  
  <p>What is the best way to obtain each of the data from the input boxes?</p>
  
  <p><b>UPDATE</b></p>
  
  <hr>
  
  <p>To obtain the solution I needed, I placed jQuery inside of my AngularJS function. My new AngularJS function looks as follows:</p>
  
  <pre><code>$scope.insert = function() {
      $('.scan-packages').each(function() {
          console.log(this.value);
      });
  };
  </code></pre>
  
  <p>Technically, I've solved this but I did so using jQuery. If anyone wants to translate the above solution into how I would go about obtaining that with pure AngularJS, please feel free to do so so I can use that solution and give you credit for answering the questions.</p>