Skip to content

Instantly share code, notes, and snippets.

@stevermeister
Created July 2, 2017 10:51
Show Gist options
  • Save stevermeister/014d82765f87ee105347745bd2f2b266 to your computer and use it in GitHub Desktop.
Save stevermeister/014d82765f87ee105347745bd2f2b266 to your computer and use it in GitHub Desktop.
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