samedi 16 février 2019

using host property mat-checbox is not working as expected Angular 6

I am using angular material mat-checkbox & host property in angular 6

in TS

@component({
selector:'app-checklist',
    template:`<mat-checkbox> </mat-checkbox>`,
    host:{
     '(document:click)': 'onclose($event)',
    }
})

When ever I am using the host the checkbox doesn't work, host is working correctly as expected but by using the Host property I am unable to achieve my checkbox functionality, I cannot unchecked or check. If remove the host property I am able to able check and unchecked.

Alternative I got solution for my functionality by using the mat-selection-list




Aucun commentaire:

Enregistrer un commentaire