title: Assign dynamic value to an Input Field in HTML
body: <p>I have an input field and I want to assign it a value dynamically fetched from DB. I will use that value later in a script. Here is my code below</p>
  <pre><code>&lt;div data-ng-model=&quot;DashboardCounterItems&quot;&gt;
  &lt;div data-ng-repeat=&quot;cItem in DashboardCounterItems&quot;&gt;
  &lt;input type =&quot;hidden&quot; id =&quot;myInput&quot; value = {{cItem.dbMeetings.length}} /&gt;
  &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  <p>Here {{cItem.dbMeetings.length}} is fetched from DB and assigned to myInput. Further when I check the value of this input in alert in script below, I get <strong>{{cItem.dbMeetings.length}}</strong> message instead of the value within it.</p>
  <pre><code>&lt;script&gt;
  var iLenthv = document.getElementById(&quot;myInput&quot;).value;
  alert(iLenthv);
  &lt;/script&gt;
  </code></pre>
  <p>Any help how can I do it. Or any other better way. I will really appreciate it.</p>