Home > Software engineering >  Safe navigation operator in angular .ts file
Safe navigation operator in angular .ts file

Time:09-26

I have used safe navigation(?.) operator in html file of angular components.
Can we use safe navigation operator in ts file?
What are the suitable places to use safe navigation(?.) operator in an angular application?

CodePudding user response:

The Optional Chaining operator is part of TypeScript since TypeScript version 3.7 from November 2019 (three years ago). So as long as your TypeScript compiler runs 3.7 or newer, there should be no problem at all using this operator.

  • Related