October 2017
Intermediate to advanced
280 pages
6h 50m
English
Now that we can add a new entry to the developers' collection, let's show a list of all the developers on the front page of the "Coders repository."
Open the ch7/step-1/home.ts file (or step-2, depending on your progress during the past section), and enter the following content:
import {Component} from '@angular/core';
import {DeveloperCollection} from './developer_collection';
@Component({
selector: 'home',
templateUrl: './home.html'
})
export class Home {
constructor(private developers: DeveloperCollection) {}
getDevelopers() {
return this.developers.getAll();
}
}
There is nothing new to us here. We extend the functionality of the Home component by providing an external template and implementing the getDevelopers ...
Read now
Unlock full access