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:

  1. why change in variable not reflect change in template ?
  2. is template not supposed update way i'm doing it? or mdv/polymer not working way intended?
  3. is possible manually trigger update of template?
  4. 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.

documentation (observables)

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

Popular posts from this blog

html - How to style widget with post count different than without post count -

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

javascript - storing input from prompt in array and displaying the array -