Project Description
Change tracking for tracking state of a JavaScript View Model when using KnockoutJS (

To Setup change tracking, add this tracker property to your view model:


viewModel.tracker = new ChangeTracker(viewModel);


Hook these into your view to determine when changes occur:




Hook this into your view model when you want to reset state in functions (ex: load, save):




Optionally, you can pass your own hashFunction for state tracking, too.

Last edited Feb 19, 2012 at 7:48 PM by johnpapa, version 4