# Mainly useful for adding a blank option that works with AngularJS # Angular doesn't seem to understand the blank option generated by rails # using the include_blank flag on select helper. angular.module("admin.indexUtils").directive "ofnSelect", -> restrict: 'E' scope: data: "=" replace: true template: (element, attrs) -> valueAttr = attrs.valueAttr || 'id' textAttr = attrs.textAttr || 'name' blank = if attrs.includeBlank? then "" else "" return ""