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();
1.4m articles
1.4m replys
5 comments
57.0k users