You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to add a simple button using svelte as shown below. The button appears but is not clickable and appears to have no event listeners attached to it. I am having this problem with any event listener in the whole template project except the links since we explicitly specify the href link. Is there a step I am missing to get it to work?
example code in the "Home.svelte" file
<script>
function handleClick() {
alert('clicked')
}
</script>
<button on:click={handleClick}>Click me </button>
I am a newbie so your help would be so much appreciated, thank you :)
The text was updated successfully, but these errors were encountered:
I am trying to add a simple button using svelte as shown below. The button appears but is not clickable and appears to have no event listeners attached to it. I am having this problem with any event listener in the whole template project except the links since we explicitly specify the href link. Is there a step I am missing to get it to work?
example code in the "Home.svelte" file
<button on:click={handleClick}>Click me </button>
I am a newbie so your help would be so much appreciated, thank you :)
The text was updated successfully, but these errors were encountered: