- Angular 6 for Enterprise:Ready Web Applications
- Doguhan Uluca
- 48字
- 2021-06-25 21:20:39
Null guarding in Angular
In JavaScript, the undefined and null values are a persistent issue that must be proactively dealt with every step of the way. There are multiple ways to guard against null values in Angular:
- Property Initialization
- Safe Navigation Operator ?.
- Null Guarding with *ngIf