import { Injectable } from '@angular/core'; import { Contact } from './contact-model'; import { Observable, of } from 'rxjs'; const contact: Contact = { name: { firstName: 'John', lastName: 'Public', middleName: 'Q', prefix: 'Mr', suffix: 'III', }, addresses: [ { line_1: '123 Main Street', city: 'New York', state: 'NY', postalCode: '12345', }, { line_1: '123 South Street', city: 'Boston', state: 'MA', postalCode: '54321', }, ], }; @Injectable({ providedIn: 'root' }) export class ContactService { constructor() { } public loadContact(): Observable { return of({...contact}); } }