Created
August 12, 2016 15:12
-
-
Save MikeRyanDev/9948a61b3393e81e68e74f57cf5d9776 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'rxjs/add/observable/of'; | |
import { Injectable } from '@angular/core'; | |
import { Observable } from 'rxjs/Observable'; | |
import { Book } from '../models/book'; | |
@Injectable() | |
export class BooksService { | |
getBooks(): Observable<Book[]> { | |
return Observable.of([ | |
{ | |
title: 'The Stand', | |
authors: [ 'Stephen King' ], | |
publishDate: '2008-06-24', | |
description: ` | |
A patient escapes from a biological testing facility, | |
unknowingly carrying a deadly weapon: a mutated strain | |
of super-flu that will wipe out 99 percent of the world’s | |
population within a few weeks. | |
`, | |
thumbnail: 'http://books.google.com/books/content?id=UbfnTcmkaKkC&printsec=frontcover&img=1&zoom=5&edge=curl&source=gbs_api' | |
} | |
]); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment