javascript - Knockout dirty flag event -


i've used dirty flag blog post here knockmeout implement such flag in model, can not work properly. somehow flag never set true.

additionaly want subscribe event triggered every time dirty flag set true. (i'll reset manually).

here's fiddle shows issue.

can point me in right direction?

a couple of small things:

  • when use span tags should not self-closing (so <span></span>). preventing final binding being shown.
  • if create view model inside of object literal, this not yet refer view model, when created dirty flag not tracking filter object. if want object literal, want create dirty flag afterwards.
  • the value binding when used select populate model value string. so, changed 1 '1', otherwise dirty immediately. there way force numeric using writeable computed observable. here 1 technique.

here updated sample: http://jsfiddle.net/rniemeyer/xw76d/4/


Comments

Popular posts from this blog

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -

php - Controller/JToolBar not working in Joomla 2.5 -