In my current project, I decided to try by knockout, and I wonder if the following is possible with it. I am writing an intranet application for some basic list manipulation. The application receives data from the MVC through AJAX. In my callback function, I populate the entries in the observable array as follows:
function showData(data) {
The dmsList function is as follows:
function dmsList(dmsEntry) { return { a: dmsEntry.a, b: dmsEntry.b, active: ko.observable(false) } }
The observed "active" will change to true when the user marks an entry in the list. So my question is:
So I wonder if itโs possible to subscribe to an โactiveโ observable? So, every time a user marks a record, the called user function is called, and the record gets into the observable array marked "notEntries"?
I have already implemented the following functions:
<input type="checkbox" data-bind="checked: active, click: $root.addToActionQueue" />
But I think that another way would be a cleaner solution, since I also have other ways to โmarkโ entries.
source share