title: How to reference a global function in a Vue component?
body: <p>I have a Vue component that has a 'select state' dropdown element. I want to add a js function that populates the options with the 50 states instead of having to hard code them. I will also have this dropdown in a couple other places so I want this function to be accessed from outside the component. What is the best way to accomplish this?</p>
  
  <pre><code>&lt;template&gt;
      &lt;div class="section" v-bind:class="sectionClass" data-mh="group3"&gt; 
          &lt;h3&gt;{{sectionTitle}}&lt;/h3&gt; 
          &lt;div class="section-content display-area"&gt; 
              &lt;i class="icon icon-health img-left"&gt;&lt;/i&gt; 
              &lt;form&gt; 
              &lt;div class="row mt"&gt; 
                  &lt;div class="col-xs-12 col-sm-8"&gt; 
                    &lt;div class="same-height-parent"&gt; 
                        &lt;div class="same-height"&gt; 
                            &lt;input type="text" class="form-control" placeholder="Enter Name"&gt; 
                        &lt;/div&gt;                                                 
                        &lt;div class="same-height"&gt; 
                            &lt;select name="state" id="state" class="form-control" tabindex="9"&gt; 
                                &lt;option value=""&gt;- Select State -&lt;/option&gt;
                            &lt;/select&gt;                                                     
                        &lt;/div&gt;                                                 
                    &lt;/div&gt;                                             
                    &lt;!-- same-height-parent --&gt;                                             
                  &lt;/div&gt;                                         
                  &lt;div class="col-xs-12 col-sm-4"&gt; 
                      &lt;button type="submit" class="btn btn-success btn-block btn-fz20"&gt;Search&lt;/button&gt;
                    &lt;/div&gt;                                         
                 &lt;/div&gt;                                                                       
              &lt;/form&gt;                                 
          &lt;/div&gt;              
      &lt;/div&gt;
  &lt;/template&gt;
  
  &lt;script&gt;
      export default {
          name: 'nameSearch',
          data: function() {
              return {
                  sectionTitle: 'Name Search'=
              }
          }
      }
  &lt;/script&gt;
  </code></pre>