Question Not reload the page in Ng-Click

vasantham08

New member
Joined
Aug 2, 2019
Messages
1
Programming Experience
Beginner
HTML:
<a class="button" ng-click="L(Post)" ng-if="Post.uid =='true'" href="/About/Aboutpage" style="text-decoration:none;" ng-init="LDetails(Post)">
    <input type="image" alt="" src="~/Images/like.png" style="max-height:20px; max-width:20px;" />&nbsp;Like<span class="badge">{{Post.L}}</span>
</a>
<a ng-click="L(Post)" ng-if="Post.uid !='true'" href="/About/Aboutpage" style="text-decoration:none;" ng-init="L(Post)">
    <input type="image" alt="" src="~/Images/liked.png" style="max-height:20px; max-width:20px;" />&nbsp;Home<span class="badge">{{Post.L}}</span>
</a>

This is my code. How to stop reloading the page in Ng-Click?

(FYI.But this is not button .Its anchor tag)
 
Last edited by a moderator:

Latest posts

Back
Top Bottom