Skip to content

Instantly share code, notes, and snippets.

@cyrilletuzi
Last active May 4, 2018 10:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cyrilletuzi/896821ad7341c02436a3963456a3ef81 to your computer and use it in GitHub Desktop.
Save cyrilletuzi/896821ad7341c02436a3963456a3ef81 to your computer and use it in GitHub Desktop.
@Injectable({ providedIn: 'root' })
export class SomeService {
constructor(protected http: HttpClient) {}
getData() {
return this.http.get<SomeData>('/path/to/api');
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment