30 seconds of angular
Star
✨✨ New to Angular? Check out interactive Angular Codelab ✨✨

Safe Navigation Operator

The Safe Navigation Operator helps with preventing null-reference exceptions in component template expressions. It returns object property value if it exists or null otherwise.

<p> I will work even if student is null or undefined: {{student?.name}} </p>
    

Links

Bonus

{{a?.b?.c}} 
    

Underneath will be compiled to.

(_co.a == null)? null: ((_co.a.b == null)? null: _co.a.b.c));