0

I saw this code. What does ?. mean? I tried to google it but couldn't find anything

<div *ngIf="primaryEmail.errors?.email">
     Primary Email not valid.
</div> 
Manu Chadha
  • 15,555
  • 19
  • 91
  • 184
  • 1
    thank you. So I guess, using a `?` after a variable creates a sort of `null`/`undefined `check – Manu Chadha Aug 22 '18 at 05:42
  • Yes indeed, It checks whether the variable is null or undefined so that our template won't try to select a property of something falsy. – Tim Martens Aug 22 '18 at 05:45

0 Answers0