             scope.$apply ->
                 fn(scope, {$event: evt, $params: params})
 
-genericModule.directive('uiEvent', ['$parse', uiEventConstructor])
 
-
-uiParsleyConstructor = ($parse, $http, url) -> (scope, elm, attrs) ->
+UiParsleyDirective = ($parse, $http, url) -> (scope, elm, attrs) ->
     fn = $parse(attrs.uiParsley)
 
     onFormSubmit = (valid, event, form) ->

            ngModel.$setViewValue(arguments[0].val)
            scope.$digest()

genericModule.directive('uiSelect2', select2Constructor)


uiEventConstructor = ($parse) -> (scope, elm, attrs) ->
    events = scope.$eval(attrs.uiEvent)
    angular.forEach events,  (uiEvent, eventName) ->
        fn = $parse(uiEvent)



AppVersionDirective = (version) -> (scope, elm, attrs) ->
    elm.text(version)


UiSelect2Directive = ->
    require: "?ngModel"
    restrict: "A"
    link: (scope, elm, attrs, ngModel) ->
