The evidence component

As we know, the news link itself comes from items saved under the /Notifier/rated-news path. So let's pull out the news item with the highest rank from rated-news and pass it to the service for counting its words. To do so, open the component file and edit the contents as follows:

// src/app/evidence/evidence.component.ts import {Component} from '@angular/core'; import {EvidenceService} from "./evidence.service"; import {AngularFire} from "angularfire2"; @Component({ selector: 'sh-evidence', templateUrl: 'evidence.html' }) export class EvidenceComponent implements OnInit{ private angularFire; private evidenceService; constructor (es:EvidenceService, af: AngularFire) { this.evidenceService = es; this.angularFire = af; } ngOnInit() ...

Get Angular Services 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.