knockout.js - Extending knockout observable array -
knockout.js - Extending knockout observable array -
i'd add together "arraycollection" functionality ko.observablearray();
i.e removeitemat(index)//dispatches item removed event additem(item)//dispatches item added event etc
i notice in of ko examples handled in model. have rich model typed collections nest in collection/array itself.
is approach advisable ko?
extending observablearrays easy , reasonable thing do.
the easiest way accomplish add together functions ko.observablearray.fn
. there doc page technique here: http://knockoutjs.com/documentation/fn.html
this little bit different after, here nice implementation of dictionary in ko may of involvement you: https://github.com/jamesfoster/knockout.observabledictionary
knockout.js
Comments
Post a Comment