title: displaying data on template using angular
body: <p>I am creating my first component using angular, its a countdown, but i don't know how show results on template</p>
  
  <p>I have tried just using {{}}but nothing happens </p>
  
  <p>thanks for your help
  ...............................................................................................................................................................................................................................................</p>
  
  <pre><code>import { Component, OnInit } from '@angular/core';
  
  @Component({
    selector: 'app-countdown',
    templateUrl: './countdown.component.html',
    styleUrls: ['./countdown.component.css']
  })
  
  export class CountdownComponent implements OnInit {
  
    mi_funcion () {
  
  
      let x = setInterval(function():void{
  
          let now = new Date().getTime();
          let countDownDate:number = new Date ("Jan 5, 2021 15:37:25").getTime();
  
          let distance: number = countDownDate - now
          let days:number = Math.floor(distance / (1000 * 60 * 60 * 24));
          let hours:number = Math.floor((distance % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60));
          let minutes:number = Math.floor((distance % (1000 * 60 * 60)) / (1000 * 60));
          let seconds:number = Math.floor((distance % (1000 * 60)) / 1000);
  
          //console.log( `Faltan:  ${days} Dias, ${hours} Horas,  ${minutes} Minutos, ${seconds} Segundos`);
  
          if (distance &lt; 0){
              clearInterval(x);
  
              console.log("El tiempo para preventa he terminado");
          }
  
      },1000);
  
  }    
  
    ngOnInit() {
  
    }
  
  }
  
  
  
  let instancia = new CountdownComponent();
  instancia.mi_funcion()
  
  
  
  //And html 
  
  &lt;div class="row"&gt;
      &lt;div class="col-3"&gt;Dias: {{days}}&lt;/div&gt;
      &lt;div class="col-3"&gt;Horas: {{hours}}&lt;/div&gt;
      &lt;div class="col-3"&gt;Minutos: {{minutes}}&lt;/div&gt;
      &lt;div class="col-3"&gt;SegundoS: {{seconds}}&lt;/div&gt;
  &lt;/div&gt;
  </code></pre>