我有这个应用程序文件,我加载/推送我的表应用程序:
(function () {
'use strict';
function UsersApp(name) {
this.store = new app.Store(name);
this.model = new app.Model(this.store);
this.listView = new app.ListView(this.store);
this.formView = new app.FormView(this.store);
this.controller = new app.Controller(this.model, this.listView, this.formView);
}
var tables = [];
var count = 0;
var $newTable = $('#newTable');
var application = new UsersApp(name);
application.store.load('data/users'+count+'.json');
tables.push(application);
$newTable.on('click', function (name) {
count++;
var application = new UsersApp(name);
application.store.load('data/users'+count+'.json');
tables.push(application);
console.log(tables);
});
})();
我想加载动态一些json文件而不重复行。 UserApp是我的应用程序,我想首先加载并推送第一个数据默认(users0.json)之后,我的点击功能应该添加到表(数组)json2,json3数据我该怎么做?