ng-click on working in Carousel

5 views
Skip to first unread message

Himanshu Sharma

unread,
Dec 15, 2017, 8:32:17 AM12/15/17
to Angular and AngularJS discussion
Hello people,

I have this html Code

<a href="javascript:void(0)" proid="{{p.ProductID}}" ng-click="addtocartRelatedProduct(p.ProductID, 1)" class="cart"></a>
wrapped inside a Carousel.

And my js is like this

 function addRelatedProduct(obj){
 var id = $(obj).attr("proid");
alert(id);
}

Issue i m getting is ng-click is not working and not hitting addRelatedProduct function in js. It is hitting function only for first anchor tag only. 
Any solutions or suggestions please?
Thanks in advance.
Reply all
Reply to author
Forward
0 new messages