blob: b0f528917092e0e8efa69d7e975530a8d462a0c5 [file] [log] [blame]
Andrew Geisslerba5e3f32018-05-24 10:58:00 -07001window.angular && (function(angular) {
2 'use strict';
Iftekharul Islamc0161392017-06-14 15:46:15 -05003
Andrew Geisslerd27bb132018-05-24 11:07:27 -07004 angular.module('app.common.directives').directive('file', function() {
5 return {
6 scope: {file: '='},
7 link: function(scope, el, attrs) {
8 el.bind('change', function(event) {
9 var file = event.target.files[0];
10 scope.file = file ? file : undefined;
11 scope.$apply();
12 });
13 }
14 };
15 });
Iftekharul Islamc0161392017-06-14 15:46:15 -050016
Andrew Geisslerba5e3f32018-05-24 10:58:00 -070017})(window.angular);