angular - Why Checkbox [checked] is firing multiple times for all options -


i creating form have field checkbox (multiple options).
use such kind of field in many places in application , that's why decided use directive functionality.

what noticed angular2 not supporting checkbox (multiple options) in nice way.
because of using [checked] options checkbox verify if checkbox checked or not , (change) update model.

during development noticed on clicking on checkbox - [checked] firing multiple times , checking options not in clicked.

i created plunkr show i`m talking about.

i wondering why [checked] firing multiple times (in plunkr twice) , it`s checking options not clicked one?

it's how angular works. change part of application's model angular checking "zone" model (it's more complicated, should search zones in angular).

http://blog.thoughtram.io/angular/2016/02/01/zones-in-angular-2.html

http://blog.thoughtram.io/angular/2016/01/22/understanding-zones.html


Comments

Popular posts from this blog

javascript - Thinglink image not visible until browser resize -

firebird - Error "invalid transaction handle (expecting explicit transaction start)" executing script from Delphi -

mongodb - How to keep track of users making Stripe Payments -