I need to add / remove certain classes based on a click on any of the multiple elements (element children). These elements can be constructed dynamically on page load so I can't put ng-click on each.
How can I accomplish this correctly and as easily in AngularJS ?
$(".btn-group > .btn").click(function(){
$(this).addClass("active").siblings().removeClass("active");
});
addClass(), siblings() and removeClass() should work without having jQuery included as far as I know since Angular has its jqLite right?
I am sure I am missing something obvious ... Thanks for any help.