Skip to content

Commit

Permalink
Moved get after set to fix issue when initializing in Angular2 (bleen…
Browse files Browse the repository at this point in the history
  • Loading branch information
parag-patwardhan authored and jkuri committed Dec 16, 2016
1 parent 8ba6cc1 commit d5bb4ab
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions src/directives/ng-file-drop.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,16 @@ export class NgFileDropDirective {

_options:any;

get options(): any {
return this._options;
}

@Input('options')
set options(value: any) {
this._options = value;
this.uploader.setOptions(this.options);
}

get options(): any {
return this._options;
}

files: any[] = [];
uploader: Ng2Uploader;

Expand Down
8 changes: 4 additions & 4 deletions src/directives/ng-file-select.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,16 @@ export class NgFileSelectDirective {

_options: any;

get options(): any {
return this._options;
}

@Input('options')
set options(value: any) {
this._options = value;
this.uploader.setOptions(this.options);
}

get options(): any {
return this._options;
}

files: any[] = [];
uploader: Ng2Uploader;

Expand Down

0 comments on commit d5bb4ab

Please sign in to comment.