In my application, there are multiple 'save and close' links, each with a unique function triggered when clicked, specified by the directive ng-really-click
. This directive confirms closure before executing the designated function. For example:
<a ng-really-click="someCloseFunction(p1, p2)" />
Now, I need to simulate a user clicking the save button from another part of the app without the confirmation step. Since I don't know in advance which specific close function should be invoked, I have to identify it by examining the ng-really-click
attribute of the close link.
Once I determine the function call expression specified in the attribute, I aim to call that function on a particular scope stored in a variable called currentScope
. How can this be achieved?