digitalhelpersleague/asterism

View on GitHub
app/assets/javascripts/rism/directives/fileread.js.coffee

Summary

Maintainability
Test Coverage
@rism.directive 'ngFileread', ->
  restrict: 'A'
  scope:
    ngFileread: '=',
  link: (scope, element, attributes) ->
    element.bind('change', (changeEvent) ->
      scope.$apply ->
        scope.ngFileread = changeEvent.target.files
    )