Skip to content

Instantly share code, notes, and snippets.

@zimejin
Last active September 19, 2019 10:32
Show Gist options
  • Select an option

  • Save zimejin/57cfa852b5deff42e4a816ca18e58bc5 to your computer and use it in GitHub Desktop.

Select an option

Save zimejin/57cfa852b5deff42e4a816ca18e58bc5 to your computer and use it in GitHub Desktop.
Two kinds of ViewChild and Their returns
@ViewChild('bioRef', {read: ElementRef}) private bioRef: ElementRef;
@ViewChild('passwordRef', {read: ElementRef}) private passwordRef: ElementRef;
// returns
ElementRef {nativeElement: ion-radio.md.in-item.interactive.hydrated}
// native element
<ion-radio _ngcontent-ibt-c6="" slot="start" value="fingerprint" ng-reflect-value="fingerprint" role="radio"
aria-checked="false" aria-labelledby="ion-rb-1-lbl" class="md in-item interactive hydrated"></ion-radio>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment