title: How to use addroutes method in Vue-router?
body: <p>I have created a function "addroute()" to add routes dynamically,but it didn't work(the router does not changed). 
  Is this a right way to use addRoutes method? I have learned this from tutorial.
  If not then give me a correct example,Thanks!</p>
  
  <pre><code>...
  const Bar={
      template:'#panels',
      data(){
          return {title:'badss'}          
      }
          };
  const Foo={
      template:"#panels",
          data(){
          return {title:'hell'}
      }
          };
  
  
  const router = new VueRouter({
    routes:[
        {path:'/foo',component:Foo},
        {path:'/bar',component:Bar}
    ]
  });
  
  new Vue({
      el:'#root',
      router:router,
      data:{
      stats:stats
  },
  methods: {
      //
  },
  
  });
  
  function addroute(){//watch here
      router.addRoutes([{path:'/ioio',component:{template:'#panels'}}])
  }
  setInterval("addroute()", 2000)//watch here
  ...
  </code></pre>