import { Component , OnInit } from '@angular/core' ; import { DataService } from 'src/app/data/data.service' ; @ Component ( { selector : 'app-root' , templateUrl : './app.component.html' , styleUrls : [ './app.component.css' ] } ) export class AppComponent implements OnInit { constructor ( public data ) { } ngOnInit ( ) { this . data . neoData$ ( ) . subscribe ( ) ; } }