title: Getting previous route info before rendering in vue js?
body: <p>I am new to Vue.js. I have to show a pop up (seperate component) when a user comes from a specific path.<br>
  I used a show variable which is by default set to true. As user lands on this page, user will see a pop up. But I want to get the path name in my component so that I will show the pop up only when a user comes from the specific URL.<br>
  I used the <code>beforeRouteEnter (to, from, next)</code> method for getting the previous path. And according to that I am changing the show variable value.</p>
  
  <pre><code>  beforeRouteEnter (to, from, next) {
      next(vm =&gt; {
        if (from.path === '/my-specific-path') {
          vm.show = true;
        }else{
          vm.show = false;
      });
    }, 
  </code></pre>
  
  <p>But it is showing my pop up because mounting is done before calling <code>beforeRouteEnter</code> method.</p>