Automatically trigger click event on href if condition on same href is true in angular
<a (click)="{(subCategory.show == true)?#myId}" >item name </a> <div id="myId"></div>
try this but this will only work if your hide function works
document.getElementById("myId").click();
2.1m questions
2.1m answers
60 comments
57.0k users