You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
svelte/test/runtime/samples/custom-method/main.html

15 lines
181 B

<script>
export let counter = 0;
function add1() {
counter += 1;
}
export function foo() {
return 42;
}
</script>
<button on:click='{add1}'>+1</button>
<p>{counter}</p>