Skip to content

Instantly share code, notes, and snippets.

@casgin
Created March 12, 2019 09:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save casgin/ff09dd625653cd61b93fa2a493dab63d to your computer and use it in GitHub Desktop.
Save casgin/ff09dd625653cd61b93fa2a493dab63d to your computer and use it in GitHub Desktop.
[VueMilan Meetup 2802] Codice del template del componente "Sommatoria"
<template>
<div>
<h1>Sommatoria</h1>
<fieldset>
<legend>{{titolo}}</legend>
<p>{{sottotitolo}}</p>
<input type="number" v-model="numeroInserito"
@keypress.enter="sommaNumero">
<button v-on:click="sommaNumero()">Add</button>
</fieldset>
<div>
Totale = <strong>{{totale}}</strong>
</div>
<div>{{sommatoria}}</div>
<ul>
<li v-for="numero in elencoNumeri" v-bind:key="numero">
{{numero}}
</li>
</ul>
</div>
</template>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment