title: window.print is not printing text of input element
body: <p>I know this question was asked before. But I could not found a sure solution for it yet. Though I tried all the previous solutions, it doesn't work.</p>
  
  <p>I am doing some coding on AngularJS and I have to print the form data once it is filled. However when I print it, all the form fields are showing empty in the printout. Somewhere it is suggested to handle the issue using CSS with the media query below. But still no success. So what could be the possible solution?</p>
  
  <h3>Media query:</h3>
  
  <pre><code>"@media print { 
  @page { margin: 0; }
  body {display:none}     
  }"
  </code></pre>
  
  <h3>JS:</h3>
  
  <pre><code>    $scope.printDiv = function(divName) {
  
      var printContents = document.getElementById(divName).innerHTML;
  
      var popupWin = window.open('', '_blank', 'width=300,height=300');
      popupWin.document.open();
      popupWin.document.write('&lt;html&gt;&lt;head&gt;&lt;link rel="stylesheet" href="sample.css" /&gt;&lt;/head&gt;&lt;body onload="window.print()"&gt;' + printContents + '&lt;/body&gt;&lt;/html&gt;');
      popupWin.document.close();      
  }
  </code></pre>
  
  <h3>HTML:</h3>
  
  <pre><code>&lt;div&gt;
  &lt;div id='printable'&gt;
  &lt;p class="address"&gt;ADDRESS:&lt;br/&gt;
  &lt;input type="text" ng-model="Address_line1" maxlength="40" placeholder="Address line 1" style="border:1px solid white" width="60"/&gt; &lt;br/&gt;
  &lt;input type="text" ng-model="Address_line2" maxlength="30" placeholder="Address line 2" style="border:1px solid white" /&gt; &lt;br/&gt;
  &lt;input type="text" ng-model="Address_line3" maxlength="30" placeholder="Address line 3" style="border:1px solid white" /&gt; &lt;br/&gt;
  &lt;input type="text" ng-model="Address_line4" maxlength="30" placeholder="Address line 4" style="border:1px solid white" /&gt;
  &lt;br/&gt;
  &lt;input type="text" ng-model="Address_line5" maxlength="30" placeholder="Address line 5" style="border:1px solid white" /&gt;
  &lt;br/&gt;
  
  &lt;/p&gt;
  &lt;/div&gt;
  &lt;button style="margin:auto;display:block;" ng-click="printDiv('printable');"&gt;Print&lt;/button&gt;
  &lt;/div&gt;
  </code></pre>