How to create sheet model from data attributes

:one: code

<a
  href="#"
  class="item-link item-content"
  data-id="{{this.OrderId}}"
  data-name="hello"
  @click="handleClick"></a>
handleClick(id){
}

:two: how could i get data-attributes
:three: i’ve followed this topic. no work


:four: env, framework7-cli cordova android

handleClick(e) {
console.log(e.target.getAttribute(‘data-id’);
console.log(e.target.getAttribute(‘data-name’);
}

  • thanks to support :+1:t3:
  • target is bubbling
  • so, if a tag got clicked, shows dataset else returning null
  • it required to find closest target
  • below code worked
    • const el = e.target.closet('a')
      console.log(el.dataset.name)