Should ng-click work with img tag ?
myFunction is defined in controller and is $scop
EDIT Since as you said in the comments bootstrap is not an option for you, i would suggest you write your own little directive. There is probably tons of tutorial out there like this
The Problem in your case is, that you manipulate the DOM from outside the Angular-Scope. So Angular iteslf doesnt even know about those new image-elements, and further not about the ng-click and ng-src directive. This would only be the case, if you would use Angulars own $compile-Service to put the images back into the DOM.
I would recommend you to use Angular-UI Bootstrap for an image gallery. Else, you would need to create your own Directive for this, but why reinvent the wheel?