How can i trigger a click event for li elements specifying their index from the angularjs directive? I have tried using $first for triggering click for the first element, but it
This is more the Angular way to do it: http://plnkr.co/edit/xYNX47EsYvl4aRuGZmvo?p=preview
ng-click. Your final requirements may be different, but using a directive to bind click and change src was overkill, since most of it can be handled with templatebackground-image, then you'll need a directive like ngSrc that defers setting the background-image style until after real data has loaded.