title: Uncaught Reference error $ is not defined in Angular
body: <p>I am having some jquery script in "/src/assets/js/auth.js".</p>
  
  <p>I have included the file and jquery plugin in angular.cli.json file.</p>
  
  <p><strong>angular.cli.json:</strong></p>
  
  <pre><code>"scripts": [
      "../src/assets/js/auth.js",
      "../../node_modules/jquery/dist/jquery.min.js"
    ],
  </code></pre>
  
  <p>Finally I have imported jquery in the app.component.ts.</p>
  
  <p><strong>app.component.ts:</strong></p>
  
  <pre><code>import * as $ from 'jquery';
  </code></pre>
  
  <p>To make sure whether jquery works or not, I have put the jquery code in ngOnInit() {} function and its works well.</p>
  
  <p>But when I am placing it as an external js file, I will always return the error:
  <strong>Uncaught Reference error $ is not defined</strong></p>
  
  <p>Please someone help me to fix this issue.</p>