Scroll to top on route change – Vue.js

If you want to scroll the page to the top once you change your route using vue-router there’s two options. Both use the Navigation Guards Globally This will be have an effect on every single view change: View specific You can use the same snippet in the mounted function like this:

Yet another regex for email validation

Here’s a nice little regular expression for checking valid emails. There are dozens of email validations out there, this is just another one…