October 2017
Intermediate to advanced
280 pages
6h 50m
English
Now, let's implement the logic for importing the existing developers from GitHub. First, we will need to import HttpClientModule in our AppModule class:
import {HttpClientModule} from '@angular/common/http';
...
@NgModule({
imports: [..., HttpClientModule],
declarations: [...],
providers: [...],
bootstrap: [...]
})
class AppModule {}
...
After that, open the ch7/step-2/add_developer.ts file and enter the following imports:
import {GitHubGateway} from './github_gateway';
Add GitHubGateway to the list of providers of the AddDeveloper component:
@Component({
...
providers: [GitHubGateway]
})
class AddDeveloper {...}
As the next step, we have to include the following parameters in constructor of the class:
constructor(private ...
Read now
Unlock full access