OK, I got it, i was actually returning a function from the vm module for the main view, this will make the vm to instantiate everytime, I now return a new object and the problem is solved:
Before:
define([
'plugins/router',
'knockout'
],
function (router,ko) {
var listview= function() {
//allMyobservables here, etc
}
return listview
}
);
Now:
define([
'plugins/router',
'knockout'
],
function (router,ko) {
var listview= function() {
//allMyobservables here, etc
}
return new listview()
}
);
Works as expected.