title: TypeError: Cannot read property '$emit' of null Vuejs Router
body: <p>I have a router like this</p>
  
  <pre><code>{
            path: 'user',
            redirect: '/user',
            name: 'user',
            component: {
              render(c) {
                return c('router-view', {
                  on: {
                    showLoading: function (val) {
                      this.$emit('showLoading', val)
                    }
                  }
                })
              }
            },
  </code></pre>
  
  <p>when run that router I got an error </p>
  
  <blockquote>
    <p>"[Vue warn]: Error in event handler for "showLoading": "TypeError:
    Cannot read property '$emit' of null"</p>
  </blockquote>
  
  <p>.
  As I googled, it seem like I can't use <code>this.$emit</code> inside router. I want to emit event <code>'showLoading'</code>, is it possible?</p>