Created
July 2, 2017 10:51
-
-
Save stevermeister/014d82765f87ee105347745bd2f2b266 to your computer and use it in GitHub Desktop.
This file contains hidden or 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'; | |
| @Injectable() | |
| export class CalcService { | |
| sum(a, b) { | |
| return a + b; | |
| } | |
| sumAsync(a, b) { | |
| return new Promise((resolve) => { | |
| setTimeout(() => { | |
| resolve(a + b); | |
| }, 3000); | |
| }); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment