title: How to set data variable outside Vue file
body: <p>I am using Vue.js for some data binding and data filtering. I have created a Vue object inside a .js file and I want to pass some data from outside the file.</p>
  
  <p>This is my test object testFile.js</p>
  
  <pre><code>var vm = new Vue({
      el:  "#results",
      data: {
          results: [],
      },
  });
  </code></pre>
  
  <p>Now in my html i do this:</p>
  
  <pre><code>&lt;script&gt;
      window.onload = function () {
          vm.results = [
          { name: 'Bron Smith', aliases: [], age: '', state: 'FL', locations: ['Miami','Orlando','Biscayne'], relatives: ['Dana Smith', 'Diana Smith', 'Test Smith'], report: 'dsgsd'},
      ];
  };
   &lt;/script&gt;
  </code></pre>
  
  <p>My Vue object gets the data but it doesn't show in the html.
  Is there a way to pass this data and the data to actually show in the html?</p>