Sign Up" /> Sign Up" /> Sign Up"/>
I want to link a button to a relative path in Sapper. Is there a better way than this?
<button onclick="window.location='signup';">Sign Up</button>
If the purpose of this button is to only redirect the user to another page please directly use an anchor and style it as a button:
<a class="btn" href="/signup">Sign Up</a>
It will make your app more SEO friendly.
<script> import { goto } from '@sapper/app'; </script> <button on:click={() => goto('/signup')}>Sign Up</button>
If the purpose of this button is to only redirect the user to another page please directly use an anchor and style it as a button:
It will make your app more SEO friendly.