Skip to content

Commit

Permalink
Cleaner way to handle typing of viewchilds
Browse files Browse the repository at this point in the history
  • Loading branch information
sconix committed May 18, 2018
1 parent bad3f94 commit e615199
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions example/src/app/app.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ export class AppComponent implements AfterViewInit {
readOnly : false
};

@ViewChild(AceComponent) componentRef: AceComponent | undefined;
@ViewChild(AceDirective) directiveRef: AceDirective | undefined;
@ViewChild(AceComponent) componentRef?: AceComponent;
@ViewChild(AceDirective) directiveRef?: AceDirective;

constructor() {}

Expand Down
2 changes: 1 addition & 1 deletion src/lib/ace.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ export class AceComponent implements AfterViewInit {
@Output() changeSession = new EventEmitter<any>();
@Output() changeSelection = new EventEmitter<any>();

@ViewChild(AceDirective) directiveRef: AceDirective | undefined;
@ViewChild(AceDirective) directiveRef?: AceDirective;

constructor() {}

Expand Down

0 comments on commit e615199

Please sign in to comment.