title: Check if there is a previous page in vue route
body: <p>I am using <code>$router.go(-1)</code> to go back to the previous page but as I am using this on a home page I want know how to check if there is a previous route.</p>