3 ms·
Because "this" as the second argument to the ko.dependentObservable doesn't refer to the viewModel object (it's still being declared), it refers to whatever the
by bialecki 15y ago
Because "this" as the second argument to the ko.dependentObservable doesn't refer to the viewModel object (it's still being declared), it refers to whatever the current context is. To check it, console.log or alert "this" inside the function and see what it's value is.
- wccrawford 15y agoIn other words, it could work, but would need the correct context instead of 'this'.