Last active
June 21, 2016 06:12
-
-
Save kutyel/e421b1a180e0d56187e3 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 { Injectable } from '@angular/core'; | |
import { Painter } from './painter'; | |
import { PAINTERS } from './painters.mock'; | |
@Injectable() | |
export class PainterService { | |
getPainters(): Promise<Painter[]> { | |
return Promise.resolve(PAINTERS); | |
} | |
getLaggedPainters(): Promise<Painter[]> { | |
return new Promise<Painter[]>(resolve => | |
setTimeout(() => resolve(PAINTERS), 3000) | |
); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment