From 3746a9b878e716bc4183339d2ce264d86c432069 Mon Sep 17 00:00:00 2001 From: Mario Colque Date: Fri, 25 Apr 2014 19:11:56 -0300 Subject: [PATCH] added a new directive for import backups --- index.html | 4 ++++ js/directives.js | 12 +++++++++++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/index.html b/index.html index b9ed6d77d..dbea93755 100644 --- a/index.html +++ b/index.html @@ -162,6 +162,10 @@ diff --git a/js/directives.js b/js/directives.js index 9dd48091c..580434df8 100644 --- a/js/directives.js +++ b/js/directives.js @@ -75,5 +75,15 @@ angular.module('copay.directives') } } }) -; + .directive('ngFileSelect',function() { + return { + link: function($scope, el) { + el.bind('change', function(e) { + $scope.file = (e.srcElement || e.target).files[0]; + console.log('file directive', $scope.file); + $scope.getFile(); + }); + } + } + });