Dear All,
I am beginner in Angular 5 and ASP .net MVC. I was creating one web page using Angular 5.
In a table I was printing data which comes from database with table name tblStudent.
In that table there is last last column with name Active which is Boolean value.
What I am doing with help Angular 5 I am just showing one checkbox enabled or disabled.
If I am getting value true then I should able to check the checkbox.
Here is my code which won't work :
- <table>
- <tr
- *ngFor="let item of items | paginate: { itemsPerPage: 10, currentPage: p }; let i = index">
- <td> {{ 10 * (p - 1) + i + 1}} </td>
- <td>
- <ng-template [ngIf]="item.Activate == true" [ngIfElse]="elseBlock">
- <div>
- <input type="checkbox" (change)="selected(item, $event)">
- </div>
- </ng-template>
- <ng-template #elseBlock>
- <div>
- <input type="checkbox" (change)="selected(item, $event)" disabled>
- </div>
- </ng-template>
- </td>
- <td>{{item.Group_Name}}</td>
- <td>{{item.Description}}</td>
- <td>
- <i class="material-icons icon-Green" id="cursor" (click)=" ViewMisc(item.ID,content) ">
- border_color</i>
- </td>
- </tr>
- </table>
Please help me with easy solution.
Thanking you in advance