File tree Expand file tree Collapse file tree 2 files changed +7
-3
lines changed
01-svelte/06-bindings/06-select-bindings
02-sveltekit/05-api-routes/01-get-handlers Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change 2
2
title : Select bindings
3
3
---
4
4
5
- We can also use ` bind:value ` with ` <select> ` elements. Update line 20 :
5
+ We can also use ` bind:value ` with ` <select> ` elements. Update line 32 :
6
6
7
7
``` svelte
8
8
<select bind:value={selected} on:change="{() => answer = ''}">
Original file line number Diff line number Diff line change @@ -12,7 +12,9 @@ export function GET() {
12
12
const number = Math .ceil (Math .random () * 6 );
13
13
14
14
return new Response (number, {
15
- ' Content-Type' : ' application/json'
15
+ headers: {
16
+ ' Content-Type' : ' application/json'
17
+ }
16
18
});
17
19
}
18
20
```
@@ -29,7 +31,9 @@ export function GET() {
29
31
const number = Math .ceil (Math .random () * 6 );
30
32
31
33
-- - return new Response (number, {
32
- ' Content-Type' : ' application/json'
34
+ headers: {
35
+ ' Content-Type' : ' application/json'
36
+ }
33
37
});-- -
34
38
++ + return json (number);++ +
35
39
}
You can’t perform that action at this time.
0 commit comments