Rule: template-no-negated-async

Ensures that strict equality is used when evaluating negations on async pipe output.

Rationale

Angular’s async pipes emit null initially, prior to the observable emitting any values, or the promise resolving. This can cause negations, like *ngIf=”!(myConditional | async)” to thrash the layout and cause expensive side-effects like firing off XHR requests for a component which should not be shown.

Notes:
TS Only

Config

Not configurable.

Examples
Schema
null