title: How set value in hidden input in Angular JS?
body: <p>I have hidden input in template HTML:</p>
  
  <pre><code>&lt;input type="hidden" name="idNote" value="{{formSpam.idNote}}" ng-model="formSpam.idNote" required&gt;
  </code></pre>
  
  <p>Also method in controller that takes one param and assigns this value to <code>formSpam.idNote</code>:</p>
  
  <pre><code>$scope.ClickSpam = function (id){
        $scope.formSpam.idNote = id;
  }
  </code></pre>
  
  <p>But in template for attribute <code>value</code> this is empty when I send form. Why?</p>
  
  <p>Completed code:</p>
  
  <pre><code>&lt;div class="spam-icon ng-scope" data-dismiss="modal" ng-controller="SpamController" ng-click="ClickSpam(22, 1);" data-toggle="modal" data-target="#spamModal"&gt;&lt;/div&gt;
  </code></pre>
  
  <p>After this HTML in bottom page:</p>
  
  <pre><code>&lt;div class="modal fade spam-modal" id="spamModal" ng-controller="SpamController" tabindex="-1" role="dialog" aria-hidden="true"&gt;
  &lt;input type="hidden" name="idNote" ng-value="formSpam.idNote" ng-model="formSpam.idNote" required&gt;
  &lt;/div&gt;
  </code></pre>