No, if I understand what you are trying to do, you complicate things a bit.
In your case, it looks like you have something like:
<img open-cal/> <input ng-click="doSomething()">
If you click on the img button, click on the tab using the openCal directive. Instead, you need to do something like this:
<div ng-click="doSomething()"> <img> <input> </div>
If doSomething () needs to get data from input, use ng-model to bind data from your input to your area.
ALTHOUGH! If you ever need to make a directive, this is the right way to do it. Using element.bind is not a problem as it is included in Angular. What you want to avoid is to use things like $ ('. Calendar'). Click etc.
source share