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';
22
33import './input-file.component' ;
44
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+ }
109
11- vm . fileChanged = result => {
10+ $onInit ( ) {
11+ this . files = [ ] ;
12+ }
13+
14+ fileChanged ( result ) {
1215 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 ) ;
1619 } ) ;
17- } ;
20+ }
21+
22+ openSelectorRegister ( handler ) {
23+ this . _openSelector = handler ;
24+ }
25+
26+ openSelector ( ) {
27+ this . _openSelector ( ) ;
28+ console . log ( this . aFunction ) ;
29+ }
1830}
1931
2032angular . module ( 'dev-server' , [
2133 'angularjs-input-file'
2234] ) . component ( 'devServer' , {
23- controller : [ '$timeout' , DevServerComponent ] ,
35+ controller : DevServerComponent ,
2436 template : `
2537<form>
2638 <label>no params</label>
You can’t perform that action at this time.
0 commit comments