After last update of firefox (I asssume) I have problem with firebug console. In my app when I combine app.refresh()
with setting observable on get "too much recursion" is thrown and firefox is not responding. When I close firebug console everything works well.
In my viewmodel I have:
self.firstStep = ko.observable();
var app = Sammy(function () {
this.before({ only: { verb: 'get', path: URL.FirstStep } }, function (context) {
console.log("before");
});
this.get(URL.FirstStep, function () {
self.firstStep(new firstWindow());
console.log("get");
});
});
self.LoadData = function () {
$.ajax({
//...
success: function (data) {
//here is commented out because of debuging the problem
},
complete: function () {
app.refresh();
}
});
};
app.run();
self.LoadData();
Get in console is logged once, before is logged twice. When I comment out self.firstStep(new firstWindow())
get is fired twice too. In chrome everything works fine. Help really appreciated.
EDIT: @Mörre
When I modify code like:
this.get(URL.FirstStep, function() {
self.firstStep = ko.observable();
self.firtStep(new firstWindow());
console.log("get");
});
it is working.
如果您不需要使用“脚本”面板调试JavaScript,请禁用“脚本”面板为我解决此问题。
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.