title: In angular 6 use defer in script tag
body: <p>Some of our scripts are included in index.html and some exists in angular.json file under scripts tag.
  To increase Page Speed I have added defer tag and reordered scripts for proper execution.</p>
  
  <p>index.html:(under body tag)</p>
  
  <pre><code>    &lt;body&gt;
             &lt;script type="text/javascript" src="app/assets/js/jquery.min.js"&gt;&lt;/script&gt;
              &lt;script type="text/javascript" src="app/assets/js/jquery-3.1.1.min.js"&gt;&lt;/script&gt;
              &lt;script type="text/javascript" src="app/assets/js/pixel-admin.min.js"&gt;&lt;/script&gt;
              &lt;script type="text/javascript" src="app/assets/js/jquery.slimscroll.min.js" defer&gt;&lt;/script&gt;
              &lt;script type="text/javascript" src="app/assets/js/select2.full.min.js" defer&gt;&lt;/script&gt;
              &lt;script type="text/javascript" src="app/assets/js/bootstrap.min.js" defer&gt;&lt;/script&gt;
              &lt;script type="text/javascript" src="app/assets/js/bootstrap-tabdrop.min.js" defer&gt;&lt;/script&gt; 
          &lt;app-root&gt;
                  &lt;div class="page-loader" id="loader" style="display:block;"&gt;
                      &lt;img alt="page-loader" src="app/assets/images/ajax-loader.gif" /&gt;
                  &lt;/div&gt;
              &lt;/app-root&gt;
  &lt;/body&gt;
  </code></pre>
  
  <p>angular.json: (under scripts tag):</p>
  
  <pre><code>"scripts": [
            "src/app/assets/js/persist-all-min.js",
            "src/app/assets/js/persist-min.js",
            "src/app/assets/plugins/dropzone/dropzone.js",
            "src/app/assets/js/loader.js",
            "node_modules/datatables.net/js/jquery.dataTables.js"
            ]
  </code></pre>
  
  <p>With above index.html settings system works fine but page speed is downgraded to D(68%) according to Gtmetrix site.</p>
  
  <ol>
  <li>If I put defer on jquery or pixel-admin js files then system isn't behaving well. But page speed increased to B(53%).</li>
  <li>What is the best practice or place to keep these scripts in Angular?</li>
  <li>Can I include defer tag in the angular.json scripts?</li>
  <li>Is it possible to include defer tag in all the scripts which are used in any angular project? If possible then how I may achieve it?</li>
  </ol>
  
  <p>Thank you.</p>