Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

*ngif vs ngif

ngIf is the directive. Because it's a structural directive (template-based), you need to use the * prefix to use it into templates.

*ngIf corresponds to the shortcut for the following syntax ("syntactic sugar"):

<template [ngIf]="condition">
  <p>
    Our heroes are true!
  </p>
</template>
Equivalent to:

<p *ngIf="condition">
  Our heroes are true!
</p>
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #ngif
ADD COMMENT
Topic
Name
7+2 =