![Angular 6 for Enterprise:Ready Web Applications](https://wfqqreader-1252317822.image.myqcloud.com/cover/801/36699801/b_36699801.jpg)
上QQ阅读APP看书,第一时间看更新
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