mercredi 31 mai 2017

unchecking a checkbox from a button Angular2

I am developing a project using Angular2. I have a list called brands which contain other list called descriptions.

this list will create checkboxes:

<div *ngFor="let brand of brands">
    
    <div*ngFor="let description of brand.descriptions" >
        <input type="checkbox" name="checkbox" />
    </div>
</div>

and I have two text boxes:

<input name="brand" />
<input name="description" />
<button>uncheck</button>

the button event will uncheck only the checkbox with the brand and the description that mentioned in the input without changing or rebuilding the list because I need to keep checkboxes' status correct.

any idea?




Aucun commentaire:

Enregistrer un commentaire