0

In this article the author uses a let-name directive on the template like this:

<ng-template #testTemplate let-name>
   <div>User {{ name }} </div>        
</ng-template>`

Is that part of angular/core or angular/cdk directives or something the author invented?

Ole
  • 41,793
  • 59
  • 191
  • 359

1 Answers1

1

From Angular Docs

The Angular microsyntax lets you configure a directive in a compact, friendly string. The microsyntax parser translates that string into attributes on the <ng-template>

For example, microsyntax in Angular allows you to write

<div *ngFor="let item of items">{{item}}</div>

instead of

<ng-template ngFor let-item [ngForOf]="items"><div>{{item}}</div></ng-template>.
coderpc
  • 4,119
  • 6
  • 51
  • 93