title: Use .js file in ionic 4
body: <p>I am new to ionic, I want to use <code>.js</code> file in one page</p>
  
  <p>I have a <code>.js</code> file which is create bubble in canvas, </p>
  
  <p>What I want to do is, want to use that <code>.js</code> file in my ionic 4 project and show bubble on my home page.</p>
  
  <p>Here is the <a href="https://codepen.io/controversial/pen/wWVGOv" rel="nofollow noreferrer">Link</a> for that codepen which I want to use</p>
  
  <p>I had created file in <code>'assets/js/bubblefile.js'</code> but I don't know how to use <code>'bubblefile.js'</code> file in my <code>home.html</code> or <code>home.ts</code>? Below is my code.</p>
  
  <p><strong>Edited</strong></p>
  
  <p><code>home.html</code> Code :</p>
  
  <pre><code>&lt;ion-header&gt;
    &lt;ion-toolbar&gt;
      &lt;ion-title&gt;
        Ionic Blank
      &lt;/ion-title&gt;
    &lt;/ion-toolbar&gt;
  &lt;/ion-header&gt;
  
  &lt;ion-content&gt;
  
    &lt;script src="assets/js/bubblefile.js"&gt;&lt;/script&gt;
  
  &lt;/ion-content&gt;
  </code></pre>
  
  <p><code>home.ts</code> Code</p>
  
  <pre><code>import { Component } from '@angular/core';
  import './assets/js/bubblefile';
  
  @Component({
    selector: 'app-home',
    templateUrl: 'home.page.html',
    styleUrls: ['home.page.scss'],
  })
  export class HomePage {
  
  }
  </code></pre>
  
  <p>bubblefile.js Code</p>
  
  <pre><code>var nodes = new vis.DataSet([
      {label: "Pop"},
      {label: "Alternative"},
      {label: "Rock"},
      {label: "Jazz"},
      {label: "Hits"},
      {label: "Dance"},
      {label: "Metal"},
      {label: "Experimental"},
      {label: "Rap"},
      {label: "Electronic"},
  ]);
  var edges = new vis.DataSet();
  
  var container = document.getElementById('bubbles');
  var data = {
      nodes: nodes,
      edges: edges
  };
  
  var options = {
      nodes: {borderWidth:0,shape:"circle",color:{background:'#F92C55', highlight:{background:'#F92C55', border: '#F92C55'}},font:{color:'#fff'}},
      physics: {
          stabilization: false,
          minVelocity:  0.01,
          solver: "repulsion",
          repulsion: {
              nodeDistance: 40
          }
      }
  };
  var network = new vis.Network(container, data, options);
  
  
  // Events
  network.on("click", function(e) {
      if (e.nodes.length) {
          var node = nodes.get(e.nodes[0]);
          // Do something
          nodes.update(node);
      }
  });
  export { nodes, edges, container, data, options, network };
  </code></pre>
  
  <p>Structure of Project</p>
  
  <p><a href="https://i.stack.imgur.com/pGggj.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/pGggj.png" alt="Project Structure"></a></p>
  
  <p>Any help or suggestion will be appreciated,</p>
  
  <p>Thanks</p>