Skip to main content

Posts

Showing posts with the label Angular 2 ngFor Index and example

How to use *ngFor and Index in Angular 2?

In the below example, we are using user collection to display in table using Angular 2 *ngFor and I ndex for row click values like populate row data at the click of row add/edit/delete. All the detail as below examples, Stayed Informed –  Angular 2 documentations and examples Syntax – <tr * ngFor= "let user of userlist; let i = index" </ tr > home.component.html :- < div class = "row" > < div class = "col-lg-12" > < div class = "ibox float-e-margins" > < div class = "ibox-title" > < h5 > Angular 2 for loop typescript example - * ngFor < /h5> < /div> < div class = "ibox-title" > < input type = "text" [(value)] = "values" (keyup) = "onKeyUp($event)" /> < strong > Resut - {{values}} < /strong> < /div> < div class = "ibox-content" > < div class = ...