How can i get the selected item


i have one method to show an list itens, but i need to get the select item and show in a template, how could i do it

fieldsForm() {

  return [


      name: "codigoConta",

      data: setOpcaoDefault(getLista().contas),

      label: "Teste",

      type: "list",

      size: 6,

      value: getLista().contas,

      required: true,


and i need to put the selected item here:

Posição do saldo em {{need to put here- the selected item }}{{ new Date().toLocaleDateString() }} - {{ new Date().toLocaleTimeString() }}


You need to have variable at you data object and update it when input changes, something like this:


// input element that changes, could be also on click depends on your structure
<input @change=“setSelected”>

selected: “”

// method
this.selected = item