I use Angular 6 and smart table : https://akveo.github.io/ng2-smart-table/#/.
Everything works just fine, till I try to change data from static to dynamic :
This works and shows everything in table :
source: LocalDataSource = new LocalDataSource();
data = [{
id: 1,
Customer: 'UK LTD',
Name: 'Mark Poll',
Code: '84615A',
PostalCode: 'U48K46',
Date: '09/19/2018',
},
];
this.source.load(this.data);
and this doesnt :
data1 = [];
source: LocalDataSource = new LocalDataSource();
getArray() {
this.afDatabase.list('/imones').valueChanges().subscribe(res => {
this.data1 = res;
console.log(this.data1)
})
}
this.source.load(this.data1);
What's wrong with that and maybe somebody was facing this problem ?
