How to create dirty flag functionality

前端 未结 3 1497
生来不讨喜
生来不讨喜 2021-01-20 15:23

I want to create dirty flag functionality using knockout. I want to enable the save button only if something has changed. My view and my view model is exactly same as exampl

3条回答
  •  死守一世寂寞
    2021-01-20 15:41

    The dirty flag for knockout is already implement in the small library koLite - https://github.com/CodeSeven/kolite .

    Or here is an example of creating it: http://www.knockmeout.net/2011/05/creating-smart-dirty-flag-in-knockoutjs.html

提交回复
热议问题