7 lines
		
	
	
	
		
			251 B
		
	
	
	
		
			HTML
		
	
	
	
	
	
			
		
		
	
	
			7 lines
		
	
	
	
		
			251 B
		
	
	
	
		
			HTML
		
	
	
	
	
	
| {{- $initval := default 0 (.Get "init") -}}
 | |
| {{- $expr := .Get "expr" | default "count++" -}}
 | |
| {{- $label := or (.Get "label") "inc" -}}
 | |
| <div v-scope="{ count: {{ $initval }} }">
 | |
|   {| count |}
 | |
|   <button @click="{{ $expr }}">{{ $label }}</button>
 | |
| </div>
 |