Displaying companies

We have had a good start for the company module from earlier, when we implemented the "add new company" functionality. So, we can jump in and create and implement the rest of the files to display all companies.

In order to display a list of companies in our application, we create a new component file, called public/src/company/components/company-list.component.ts:

import { Component, OnInit } from 'angular2/core'; import { Router, RouterLink } from 'angular2/router'; import { CompanyService } from '../company.service'; import { Company } from '../company.model'; @Component({}) export class CompanyListComponent implements OnInit { public companies: Array<Company>; private _router: Router; private _companyService: CompanyService; ...

Get MEAN Blueprints now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.