I want to create an observable from array, but I am getting error (A tuple type element list cannot be empty) every time. I have tried a lot, but still it's not working.
listdonationsHistory(): Observable<[]> {
const donationsHistory = [
{
id :1,
type :"Aeri",
amount: 200,
frequency: 'monthly',
date: '17-09-2017',
account:'ATYTYTYY6778'
},
{
id :2,
type :"Aeri",
amount: 200,
frequency: 'monthly',
date: '17-09-2017',
account:'ATYTYTYY6778'
}
];
return Observable.from(donationsHistory);
}
Observable.create(donationsHistory)