Еще одну библиотеку ввода / вывода CSV можно найти здесь:
http://code.google.com/p/fast-cpp-csv-parser/
#include "csv.h"
int main(){
io::CSVReader<3> in("ram.csv");
in.read_header(io::ignore_extra_column, "vendor", "size", "speed");
std::string vendor; int size; double speed;
while(in.read_row(vendor, size, speed)){
// do stuff with the data
}
}
попробуйте это:
Сначала импортируйте это:
import {of} from "rxjs";
После, замените это:
this.shoppingList$ = of(this.shopping
.getShoppingList() // database list
.snapshotChanges() // gets key and value
.map(changes => { // for each change, get a new object
return changes.map(c => ({
key: c.payload.key,
...c.payload.val()
}));
}));
И переименуйте тип в вашем сервисе: [116 ]
private shoppingListRef= this.db.list<Item[]>('shopping-list');