В моей модели модели у меня есть прототипы, где этот контекст является элементом в каждой для каждой, а не для реальной модели представления. Как достичь этого?
<button data-bind="click: $parent.methodThatNeedsAccesToTheParentViewModel">Edit</button>
ViewModel:
ViewModel.prototype.methodThatNeedsAccesToTheParentViewModel= function () {
this = duff //this is the item in the foreach, not the real parent
};
Идеи?