# Function createEventDirective

- createEventDirective($parse, $rootScope, $exceptionHandler, directiveName, eventName, forceAsync): {
  restrict: string;
  compile(_element: any, attr: any): ((scope: any, element: any) => void);
  }

- #### Parameters

  - $parse: any
  - $rootScope: any
  - $exceptionHandler: any
  - directiveName: any
  - eventName: any
  - forceAsync: any

  #### Returns {
  restrict: string;
  compile(_element: any, attr: any): ((scope: any, element: any) => void);
  }

  - ##### restrict: string

  - ##### compile:function

    - compile(_element, attr): ((scope: any, element: any) => void)

    - #### Parameters

      - _element: any
      - attr: any

      #### Returns ((scope: any, element: any) => void)

      - - (scope, element): void

        - #### Parameters

          - scope: any
          - element: any

          #### Returns void

      - Defined in directive/events/events.js:56
  - Defined in directive/events/events.js:46