File tree Expand file tree Collapse file tree 1 file changed +23
-11
lines changed Expand file tree Collapse file tree 1 file changed +23
-11
lines changed Original file line number Diff line number Diff line change @@ -2,25 +2,37 @@ import angular from 'angular';
2
2
3
3
import './input-file.component' ;
4
4
5
- function DevServerComponent ( $timeout ) {
6
- const vm = this ;
7
- vm . $onInit = ( ) => {
8
- vm . files = [ ] ;
9
- } ;
5
+ class DevServerComponent {
6
+ constructor ( $timeout ) {
7
+ this . $timeout = $timeout ;
8
+ }
10
9
11
- vm . fileChanged = result => {
10
+ $onInit ( ) {
11
+ this . files = [ ] ;
12
+ }
13
+
14
+ fileChanged ( result ) {
12
15
console . log ( 'Hey !' , result ) ;
13
- vm . files . length = 0 ;
14
- $timeout ( ( ) => {
15
- [ ] . push . apply ( vm . files , result ) ;
16
+ this . files . length = 0 ;
17
+ this . $timeout ( ( ) => {
18
+ [ ] . push . apply ( this . files , result ) ;
16
19
} ) ;
17
- } ;
20
+ }
21
+
22
+ openSelectorRegister ( handler ) {
23
+ this . _openSelector = handler ;
24
+ }
25
+
26
+ openSelector ( ) {
27
+ this . _openSelector ( ) ;
28
+ console . log ( this . aFunction ) ;
29
+ }
18
30
}
19
31
20
32
angular . module ( 'dev-server' , [
21
33
'angularjs-input-file'
22
34
] ) . component ( 'devServer' , {
23
- controller : [ '$timeout' , DevServerComponent ] ,
35
+ controller : DevServerComponent ,
24
36
template : `
25
37
<form>
26
38
<label>no params</label>
You can’t perform that action at this time.
0 commit comments