如何获取元素的所有类名称?

时间:2019-07-11 15:19:10

标签: angular angular7 angular8

当用户单击时如何获取元素的所有类别?

我尝试过:

#standardSQL
SELECT *, IFNULL(FIRST_VALUE(count) OVER (win), 0) prev_count
FROM `project.dataset.events`
WINDOW win AS (PARTITION BY type ORDER BY UNIX_DATE(day) RANGE BETWEEN 2 PRECEDING AND 2 PRECEDING)   

1 个答案:

答案 0 :(得分:1)

尝试

@HostListener('click',['$event']) click(event){
    console.log(event.target.className);
  }