knockout mapping causing stackoverflow
问题 I'm experimenting with knockout and the mapping plugin and wondering why this doesn't work. I have a viewmodel that I want to load using the mapping extension function todoListViewModel(data) { ko.mapping.fromJSON(data, { todos: TodoItem.options }, self); ko.mapping.fromJSON(data, { todos: TodoItem.options }, self); } the mapping has an options that looks like this: var TodoItem = function (options) { var todoItem = ko.mapping.fromJS(options.data); todoItem.remove = function () { alert(