mercredi 25 juillet 2018

mat-checkbox inside *ngFor is not working properly in material 6

I generating checkboxes inside *ngFor using Angular 6 Material 6. The checkbox are able to display properly. But when I clicked on any one of the checkboxes, it is flickering and not able to check it properly.

I tried it in stackblitz, where it is working properly. I don't know if anything I have missed. I am struggling from past one week.

I have imported it properly in app.module.ts like this:

import {MatCheckboxModule} from '@angular/material/checkbox';

This is my code. Please suggest me any dependencies other than this I need to include.

<div *ngFor="let prop of reflectUI; let i = index">
    <mat-checkbox>prop</mat-checkbox>
</div>

Please Guide me.




Aucun commentaire:

Enregistrer un commentaire