我从firebase获取数据并使用ng2-smart-table显示数据。 我添加数据后创建按钮不关闭的问题。它仍然以添加的值打开。 我的代码是:ng2-smart-table创建按钮无法正常工作
settings = {
pager:{perPage:50},
add: {
addButtonContent: '<i class="ion-ios-plus-outline"></i>',
createButtonContent: '<i class="ion-checkmark"></i>',
cancelButtonContent: '<i class="ion-close"></i>',
confirmCreate: true,
},
和增加的功能:
onCreateConfirm(event): any {
//this service is updating the new data to firebase.
this.service.createData(event.newData);
//after that the newdata still on edit mode and not closing it...
}
但这将自动添加到表,也是我的函数添加这火力地堡db,然后它会自动更新2个实例的表,从firebase和其他的解决。 –
我不明白你的问题,你能给我更多的解释 –
问题是,我将这个新的数据添加到Firebase列表。这个列表绑定到表中的数据源,然后在表中更新它,然后如果我会按照你的方式更新表的功能,我将有2个实例,一个是解析和其他的虚拟结果一个由firebase名单。 –