Calling a directive function from an ionic header-bar


I have the following plunker

I need to call a function in my directive when I press on the ionic header-bar button.
How do you do this?

I thought adding

scope: {
control: '='

would work but I get errors.


The solution has been implemented on the plunker. I basically implemented the proposed solution here

Basically I added a broadcast to the controller when the button is pressed. And made the directive listen for this and crop the image when it hears the broadcast.