ngtemplateoutlet

Solutions on MaxInterview for ngtemplateoutlet by the best coders in the world

showing results for - "ngtemplateoutlet"
David
03 Nov 2018
1<!-- Alternative syntax -->
2<ng-container
3  *ngTemplateOutlet="optionTemplate; context:{ $implicit: option, idx: i }"
4></ng-container>
5><Copy
Serena
27 Mar 2017
1<!-- Define our template -->
2<ng-template #myTemplate> World! </ng-template>
3
4Hello
5<!-- Render the template in this outlet -->
6<ng-container [ngTemplateOutlet]="myTemplate"></ng-container>
7<>Copy
Jaiden
24 Jan 2019
1<ng-template #optionTemplate let-option let-position="idx">
2  {{ position }} : {{option}}
3</ng-template>
4
5<!-- client-one.component.html --><>Copy
Butch
12 Jan 2021
1<li *ngFor="let item of items; index as i">
2  <!-- Setting the option as the $implicit property of our context along with the row index -->
3  <ng-container
4    [ngTemplateOutlet]="optionTemplate"
5    [ngTemplateOutletContext]="{ $implicit: option, idx: i }"
6  ></ng-container>
7</li>
8
9<!-- selector.component.html --><>Copy