title: Angular 6 ReferenceError: $ is not defined error with JQuery
body: <p>I have installed angular 6 with foundation but I am getting an error with JQuery. </p>
  
  <blockquote>
    <p>Uncaught syntaxerror: unexpected identifier
    ReferenceError: $ is not defined</p>
  </blockquote>
  
  <p>In my component, i have</p>
  
  <pre><code>declare var $:any
  
  onNgInit () {
    $(document).foundation()
  }
  </code></pre>
  
  <p>I have all imports in my angular.json</p>
  
  <pre><code>scripts : [
    "node_modules/jquery/dist/jquery.js"
  ]
  </code></pre>
  
  <p>I have tried everything I found on the internet but still facing the same error. Also to add this used to work when I was working with Angular 4</p>