title: Passing an ng-model value to an object
body: <p>I have a list made with ng-repeat with options. I'm trying to make it so that when I click an option, the value of the selection will be passed to an object.</p>
  
  <pre><code>&lt;select id="selectvak" name="selectvak" class="form-control" multiple="multiple" &gt;
      &lt;option value="1" ng-repeat="t in klas" ng-model="vakselect"&gt;{{ t.Name }}&lt;/option&gt;
  &lt;/select&gt;
  
  $scope.user = {
  vak: klas.vakselect,
  };
  </code></pre>
  
  <p>I have small experience with Angular, so I'm not sure how to make it work correctly.</p>
  
  <p>Edit: </p>
  
  <p>I have adjusted my code and user.vak does seem to catch the selectvak field, but now passes it as an array. How do I make it so it's a string in $scope.user? So whenever I log user, I will see a string of vak and then an array of students.</p>
  
  <pre><code>&lt;select id="selectvak" name="selectvak" class="form-control" multiple="multiple" ng-model="user.vak" ng-options="t.Name as t.Name for t in klas" ng-click="getJSON1()"&gt;
  
  
   $scope.user = {
  vak: '',
  // klas: klasselect,
  student: [$scope.student] -1
  };
  </code></pre>