Now, after we have developed both forms—for importing existing developers and adding new developers, it is time to implement the logic behind them in the controller of the component.
For this purpose, we will need to communicate with the GitHub API. Although we can do this directly from the component's controller, by approaching the problem this way, we would couple the view with the RESTful API of GitHub. In order to enforce better separation of concerns, we can extract the logic for communication with GitHub into a separate service called GitHubGateway. Open the file called github_gateway.ts, and enter the following content:
import { Injectable } from '@angular/core';
import { HttpClient } from '@angular/common/http';
import { Observable } from 'rxjs/Observable';
export interface GitHubUser {
id: number...