mirror of
https://github.com/angular/angular
synced 2026-05-24 09:28:37 +00:00
14 lines
340 B
TypeScript
14 lines
340 B
TypeScript
|
|
import { InMemoryDbService } from 'angular-in-memory-web-api';
|
||
|
|
|
||
|
|
export class InMemoryDataService implements InMemoryDbService {
|
||
|
|
createDb() {
|
||
|
|
const heroes = [
|
||
|
|
{ id: 11, name: 'Mr. Nice' },
|
||
|
|
{ id: 12, name: 'Narco' },
|
||
|
|
{ id: 13, name: 'Bombasto' },
|
||
|
|
{ id: 14, name: 'Celeritas' },
|
||
|
|
];
|
||
|
|
return {heroes};
|
||
|
|
}
|
||
|
|
}
|