title: @media print { page-break-before; page-break-after} property not working in IONIC (angular)
body: <p>Suppose it's a sample code </p>
  <pre><code>
  &lt;div id=&quot;print-div&quot;&gt;
     &lt;p&gt;Lorem ipsum dolor sit amet page 1.&lt;/p&gt;
       &lt;ion-label&gt;page break here&lt;/ion-label&gt;
     &lt;p&gt;Lorem ipsum dolor sit amet page 2.&lt;/p&gt;
  &lt;/div&gt;
  </code></pre>
  <p>I want to print this section, where first paragraph will be in 1st page and 2nd paragraph will be in next page.</p>
  <h3>in .ts file</h3>
  <pre><code>printThis(){
     let backup = document.body.innerHTML;
     let divcontent = document.getElementById('print-div').innerHTML;
     document.body.innerHTML = divcontent;
     window.print();
     document.body.innerHTML = backup;
  }
  </code></pre>
  <h3>and in css</h3>
  <pre><code>@media print {
      ion-label{
          page-break-before: always !important;
      }
  }
  </code></pre>
  <p>But this does not breaking the page while printing.
  All the data are printing in one page &amp; if the content is larger than one page, it still printing ony one page's data.</p>
  <p>I have tried with</p>
  <pre><code>page-break-before: always;
  </code></pre>
  <pre><code>page-break-after: always;
  </code></pre>
  <pre><code>break-after: always;
  </code></pre>
  <p>But nothing happening.</p>
  <p>If anyone helps me a little bit that how to use the <em>page-break</em> property in ionic.
  I'll be very thankful.</p>