Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

refresh date and time every second angular

setInterval(() => {         
  //replaced function() by ()=>
  this.myDate = new Date();
  console.log(this.myDate); 
  // just testing if it is working
}, 1000);
 
PREVIOUS NEXT
Tagged: #refresh #date #time #angular
ADD COMMENT
Topic
Name
3+1 =