The problem is, all the demos show a $scope.openActionSheet, but I use the same action sheet in three controllers, I don’t want to define three variables, I want to use a directive to do it. But, seems like actionsheet doesn’t work inside directives today. So, I’m trying to define an actionsheet inside a service and trigger open from a directive… something like that.
unfortunately it does not work as you said. But i have a different idea.
create a controller and implement your ActionSheet.
now include/inject the controller everywhere you want your actionsheet.
and call it normal without directive.
you could also inject different buttons, but then i would think about creating a separate ActionSheet
Man, I tried a workaround, using controller and directive. (The service is optional), observe that we only use a tag f-options
I create a controller just to deal with the action sheet, and started the controller in the directive’s template. it worked, not so elegant like a meant but, it worked. Codepen