knockout dynamically replace a object in an observable array
I have knockout observable array like
var viewModel={
people : ko.observableArray([
{ name: 'Bert' },
{ name: 'Charles' },
{ name: 'Denise' }
])};
ko.applyBindings(viewModel);
with foreach binding i have displayed the array in a table now i want to
chane the first row of the table dynamically using the array index i tryed
(viewModel.people.name[0]("new value"); it doesn't work
Any ideas?
No comments:
Post a Comment