title: Function implementation is missing or not immediately following the declaration. in angular problem with ts
body: <p>please help me out with the countdown timer</p>
  
  <p>the error which I am getting for now is as follows:
  Function implementation is missing or not immediately following the declaration.</p>
  
  <p>this is from app.component.html</p>
  
  <pre><code>&lt;div app-landing&gt;
  
  &lt;/div&gt;
  </code></pre>
  
  <p>this is the html code </p>
  
  <pre><code>&lt;div class="container"&gt;
  
      &lt;!-- LEFT SIDE --&gt;
  
  
      &lt;div class="split left" id="upComing"&gt;
          &lt;h1 id="uce"&gt;THE UPCOMING EVENT&lt;/h1&gt;
          &lt;table id="tableTimer"&gt;
              &lt;tr id="timerValue"&gt;
                  &lt;td id="days"&gt;&lt;/td&gt;
                  &lt;td id="hrs"&gt;&lt;/td&gt;
                  &lt;td id="mins"&gt;&lt;/td&gt;
                  &lt;td id="secs"&gt;&lt;/td&gt;
  
              &lt;/tr&gt;
              &lt;tr id="timerSub"&gt;
                  &lt;td&gt;Days&lt;/td&gt;
                  &lt;td&gt;Hours&lt;/td&gt;
                  &lt;td&gt;Minutes&lt;/td&gt;
                  &lt;td&gt;Seconds&lt;/td&gt;
  
              &lt;/tr&gt;
          &lt;/table&gt;
      &lt;/div&gt;
  
  
      &lt;!-- RIGHT SIDE --&gt;
  
  
      &lt;div class="split right" id="nextFive"&gt;
          &lt;h1 id="nfe"&gt;THE NEXT FIVE EVENTS&lt;/h1&gt;
          &lt;table&gt;
  
          &lt;/table&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  
  
  &lt;div class="footer" id="footer"&gt;&lt;/div&gt;
  </code></pre>
  
  <p>this is the the ts file. I am totally new to angular and TS , help me solve the issue 
  want to display a countdown timer in side a table . and can't do .</p>
  
  <pre><code>
      enter code hereimport { Component, OnInit } from '@angular/core';
  
  @Component({
    selector: '[app-landing]',
    templateUrl: './landing.component.html',
    styleUrls: ['./landing.component.css']
  })
  export class LandingComponent implements OnInit {
  
    constructor() { }
  
    ngOnInit() {
    }
  
    countDown() {
      var today, eventDay, currentTime, eventTime, remainTime, sec, min, hr, days;
  
      today = new Date();
      eventDay = new Date();
  
      currentTime = today.getTime();
      eventTime = eventDay.getTime();
  
      remainTime = eventTime - currentTime;
      sec = Math.floor(remainTime / 1000);
      min = Math.floor(sec / 60);
      hr = Math.floor(min / 60);
      days = Math.floor(hr / 24);
  
      hr %= 24;
      min %= 60;
      sec %= 60;
  
      hr = (hr &lt; 10) ? '0' + hr : hr;
      min = (min &lt; 10) ? '0' + min : min;
      sec = (sec &lt; 10) ? '0' + sec : sec;
  
      document.getElementById('days').innerText = days;
      document.getElementById('days').textContent = days + '' + ':';
      document.getElementById('hrs').textContent = hr + '' + ':';
      document.getElementById('mins').textContent = min + '' + ':';
      document.getElementById('secs').textContent = sec;
  
      setInterval(this.countDown, 1000);
  
  
  }
  
  countDown();
  </code></pre>