import { Component , OnInit } from '@angular/core' ; import { TickTockService } from '../../services' ; @ Component ( { selector : 'tick-tock' , styleUrls : [ './tick-tock.component.scss' ] , templateUrl : './tick-tock.component.html' , } ) export class TickTockComponent implements OnInit { public currentTime : string ; param tickTockService public constructor ( private tickTockService ) { } /**
     * Implements onInit event handler.
     */ public ngOnInit ( ) { this . tickTockService . getTick ( ) . subscribe ( ( timeString ) => this . currentTime = timeString ) ; } }