Last active
October 8, 2019 11:57
-
-
Save IAfanasovMob/d38fb853c5c2dceb25ebb0bb33ce1af0 to your computer and use it in GitHub Desktop.
app-component.ts
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 { Component } from '@angular/core'; | |
import { HttpClient } from '@angular/common/http'; | |
@Component({ | |
selector: 'app-root', | |
templateUrl: './app.component.html', | |
styleUrls: ['./app.component.scss'] | |
}) | |
export class AppComponent { | |
userName: string; | |
constructor(protected http: HttpClient) { | |
} | |
loadStarred() { | |
this.http.get<Repo[]>(`https://api.github.com/users/${this.userName}/starred`) | |
.subscribe(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment