Access Form from ionicActionSheet

I’ve got a “save” button in an action sheet that gets triggered from a menu item. When it’s pressed I want to check the current form to see if it’s valid. The issue is that my action sheet button handlers are in a different controller from my form.

For example:
ControllerA is my general app controller that handles the menu item which triggers the action sheet.
ControllerB handles my form

One way I can think of is on ng-init of the form, set a root level variable equal to the form. It didn’t work though as the root level variable was null or undefined when I tested it.

For reference, unless someone’s got a better idea, where I ended up with is creating a root level method from my controller that my menu can access.

Inside ControllerB

$rootScope.showJobActionSheet = function() {
    ActionSheet.showJobActionSheet($scope.myForm);
  }

My menu HTML has something like:

<button ng-click="$root.showJobActionSheet()"></button>

It works fine, it just means I’ve gotta write the same code within a couple of controllers.