This is great news to all of us that likes using *ngIf .
i was added to the master repository, but not delivered yet as part of the 2.4 version.
looking at the CHANGELOG it is part of the 4.0.0-beta.0 release.
extract:
NgIf syntax has been extended to support else clause to display template
when the condition is false. In addition the condition value can now
be stored in local variable, for later reuse. This is especially useful
when used with the async
pipe.
Example:
Hello {{user.last}}, {{user.first}}!
<template #loading>Waiting...</template>
read it all here:
Advertisements