title: How can I create a countdown from a Date().getTime() in Javascript?
body: <p>I have an click function who get a number from Date().getTime(). I want to take this number and convert him in a countdown on my view.</p>
  
  <p>I'm using only javascript with Ionic framework 1x.</p>
  
  <pre><code>var currentDate = new Date().getTime();
  console.log(currentDate);
  
  var secondDate = new Date(item.date).getTime();
  console.log(secondDate);
  secondDate = new Date(secondDate).getSeconds();
  console.log(secondDate);
  $scope.countdown = secondDate;
  </code></pre>