Skip to content

Instantly share code, notes, and snippets.

@Tanver-Hasan
Created July 29, 2018 10:48
Show Gist options
  • Save Tanver-Hasan/fb1c05ae70c25df3567fd364eae04274 to your computer and use it in GitHub Desktop.
Save Tanver-Hasan/fb1c05ae70c25df3567fd364eae04274 to your computer and use it in GitHub Desktop.
import { Injectable } from '@angular/core';
import { Observable } from 'rxjs/Observable';
import 'rxjs/add/observable/of';
export interface ICustomer {
firstName: string;
lastName: string;
mobile: IMobile[];
}
export interface IMobile {
number: string;
}
@Injectable()
export class DataService {
constructor() {}
public getCustomer(): Observable {
return Observable.of(customer);
}
}
const customer: ICustomer[] = [
{
firstName: 'John',
lastName: 'lews',
mobile: [
{
number: '07948714465'
},
{
number: '07543754465'
},
{
number: '07543754465'
}
]
},
{
firstName: 'John',
lastName: 'lews',
mobile: [
{
number: '07948714465'
},
{
number: '07543754465'
}
]
}
];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment