polymer - dart mdv databinding does not update on change -
i trying databinding work in dart. im doing same in video. using pseudo code looks this:
mdv.init(); var p = new person('john'); query('#someid').model = p;
in html file have template works correctly. trying 1 way databinding work , although template correctly initialized, subsequent changes variable p not visible in template. tried trigger update
node.model = null; node.model = p;
this not trigger update however. if i'm using delay work:
node.model = null; new timer(new duration(milliseconds:20),(){ node.model = p; });
so have couple of questions this:
- why change in variable not reflect change in template ?
- is template not supposed update way i'm doing it? or mdv/polymer not working way intended?
- is possible manually trigger update of template?
- would possible convert one-way two-way databinding (i.e. making person class in psuedocode observable or something)?
ps searched , tried several things before posting here. found topic in custom polymer element created, seems more of hassle be. tried fancy-syntax lib (this did't improve it) , databinder (compile error). read couple of pages polymer, i'm not sure relevant dart , has not been deprecated (or 'stale' warning above page mentions).
you need 1 of following packages, update bindings automatically on change.
i still recommend add "polymer" dependency (remove mdv) pubspec.yaml. way won't have handle version issues , have guarantee of "confirmed" set of packages working together.
Comments
Post a Comment