1c016139fSIftekharul Islamwindow.angular && (function(angular) { 2c016139fSIftekharul Islam 'use strict'; 3c016139fSIftekharul Islam 4*d27bb135SAndrew Geissler angular.module('app.common.directives').directive('file', function() { 5c016139fSIftekharul Islam return { 6*d27bb135SAndrew Geissler scope: {file: '='}, 7c016139fSIftekharul Islam link: function(scope, el, attrs) { 8c016139fSIftekharul Islam el.bind('change', function(event) { 9c016139fSIftekharul Islam var file = event.target.files[0]; 10c016139fSIftekharul Islam scope.file = file ? file : undefined; 11c016139fSIftekharul Islam scope.$apply(); 12c016139fSIftekharul Islam }); 13c016139fSIftekharul Islam } 14c016139fSIftekharul Islam }; 15c016139fSIftekharul Islam }); 16c016139fSIftekharul Islam})(window.angular); 17