blob: e1c37420caef7127affd5f474b66d0d45e6445c2 [file] [log] [blame]
window.angular && (function(angular) {
'use strict';
angular.module('app.common.directives').directive('file', function() {
return {
scope: {file: '='},
link: function(scope, el, attrs) {
el.bind('change', function(event) {
var file = event.target.files[0];
scope.file = file ? file : undefined;
scope.$apply();
});
}
};
});
})(window.angular);