Skip to content

Instantly share code, notes, and snippets.

@NishuGoel
Created February 21, 2019 22:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save NishuGoel/5076630dbf032fc4a5883d687277fa0d to your computer and use it in GitHub Desktop.
Save NishuGoel/5076630dbf032fc4a5883d687277fa0d to your computer and use it in GitHub Desktop.
import {InMemoryDbService} from 'angular-in-memory-web-api';
import {User} from './user-data';
export class UserData implements InMemoryDbService {
createDb(){
const users: User[]=[
{ id: 1, name: 'Ram', email: 'ram@gmail.com', contact: '0000000000' },
{ id: 2, name: 'Shyam', email: 'sh@gmail.com', contact: '1111111111' },
{ id: 3, name: 'Mohan', email: 'moh@live.in', contact: '2222222222' },
{ id: 4, name: 'Rohan', email: 'rohan@gmail.com', contact: '6666666666' },
{ id: 5, name: 'Sumit', email: 'sumit@live.in', contact: '9909999999' }
];
return {users};
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment