File tree 1 file changed +18
-16
lines changed
1 file changed +18
-16
lines changed Original file line number Diff line number Diff line change 8
8
( function ( ) {
9
9
'use strict' ;
10
10
11
- angular . module ( 'angular-file-model' )
12
- . directive ( 'fileModel' , [
13
- '$parse' ,
14
- function ( $parse ) {
11
+ angular . module ( 'angular-file-model' , [ ] )
12
+
13
+ . directive ( 'fileModel' , [
14
+ '$parse' ,
15
+ function ( $parse ) {
15
16
return {
16
- restrict : 'A' ,
17
- link : function ( scope , element , attrs ) {
18
- var model = $parse ( attrs . fileModel ) ;
19
- var modelSetter = model . assign ;
20
-
21
- element . bind ( 'change' , function ( ) {
22
- scope . $apply ( function ( ) {
23
- modelSetter ( scope , element [ 0 ] . files [ 0 ] ) ;
24
- } ) ;
25
- } ) ;
26
- }
17
+ restrict : 'A' ,
18
+ link : function ( scope , element , attrs ) {
19
+ var model = $parse ( attrs . fileModel ) ;
20
+ var modelSetter = model . assign ;
21
+
22
+ element . bind ( 'change' , function ( ) {
23
+ scope . $apply ( function ( ) {
24
+ modelSetter ( scope , element [ 0 ] . files [ 0 ] ) ;
25
+ } ) ;
26
+ } ) ;
27
+ }
27
28
} ;
28
- } ] ) ;
29
+ }
30
+ ] ) ;
29
31
30
32
} ) ( ) ;
You can’t perform that action at this time.
0 commit comments