title: Use vue component in other vue component file
body: <p>I tried to use a vue component(Global.vue) in other component(App.vue), but there </p>
  
  <blockquote>
    <p>Failed to mount component: template or render function not defined</p>
  </blockquote>
  
  <p>error.</p>
  
  <p><strong>Global.vue</strong>:</p>
  
  <pre><code>&lt;template&gt;
    &lt;div class="global-view"&gt;
      &lt;p&gt;Global &lt;/p&gt;
    &lt;/div&gt;
  &lt;/template&gt;
  
  &lt;script&gt;
  export default {
    name: 'global'
  }
  &lt;/script&gt;
  </code></pre>
  
  <p><strong>App.vue</strong>:</p>
  
  <pre><code>&lt;template&gt;
    &lt;div id="app"&gt;
      &lt;global&gt;&lt;/global&gt;
      &lt;router-view&gt;&lt;/router-view&gt;
    &lt;/div&gt;
  &lt;/template&gt;
  
  &lt;script&gt;
  export default {
    name: 'app'
  }
  &lt;/script&gt;
  </code></pre>
  
  <p><strong>main.js</strong>:</p>
  
  <pre><code>import Vue from 'vue'
  import App from './App'
  import router from './router'
  
  Vue.component('global', require('./components/Global'))
  
  Vue.config.productionTip = false
  
  new Vue({
    el: '#app',
    router,
    template: '&lt;App/&gt;',
    components: { App }
  })
  </code></pre>