var Model = function(modelName) {
var url = '/data/'+modelName+'.json',
self = this;
this.Data = null;
$.ajax({
type: 'POST',
dataType: 'json',
url: url,
async: true,
success: function(response) {
self.Data = response; // Вот тут беда
},
fail: function() {
alert('Error');
}
});
}
var table = new Model('table');