Gergely Polonkai
7c36ce1282
This also makes it possible to save data. Signed-off-by: Gergely Polonkai <gergely@polonkai.eu>
14 lines
327 B
TypeScript
14 lines
327 B
TypeScript
import { InMemoryDbService } from "angular2-in-memory-web-api";
|
|
|
|
export class InMemoryDataService implements InMemoryDbService {
|
|
createDb() {
|
|
let ducks = [
|
|
{ id: 1, color: 'yellow' },
|
|
{ id: 2, color: 'blue' },
|
|
{ id: 3, color: 'pink' }
|
|
];
|
|
|
|
return {ducks};
|
|
}
|
|
}
|