A click event is not working on mobile devices. But it's working fine on other devices. If anyone knows please help to find a solution.
app.component.html:
<ul class="resp-tabs-list"> <li *ngFor="let topic of topicsList;let i=index;"(click)="getContentList(topic)" > <i class="fa fa-book"></i> {{topic.name}} <div *ngIf="topic.obtainMarks> 0" style="color: black">Competency level : {{topic.obtainMarks}} % </div> </li> </ul>
app.component.ts:
getContentList(topic: Topics): void { console.log(topic); }
Try using ng-click instead of (click). I hope it will work.
ng-click
(click)
<li *ngFor="let topic of topicsList;let i=index;" ng-click="getContentList(topic)">
2.1m questions
2.1m answers
60 comments
57.0k users