function(elem, attrs) {
              var attr = attrs[directiveName];
              var needsInterpolation = attr.match(/\{\{/);

              var exprFn = function($scope) {
                var res = attr;
                if (needsInterpolation) {
                  var interpolateFn = $interpolate(res);
                  res = interpolateFn($scope);
                }
                if (methodName === 'set') {
                  res = ($parse(res))($scope);
                }
                return res;
              };

              return function(scope, elem, attrs) {
                var callback = function() {
                  var arg = exprFn(scope);
                  return method.call(SharedState, arg);
                };
                uiBindEvent(scope, elem, attrs.uiTriggers, callback);
              };
            }