Angular get current year – typescript get current year : In you are using Angular and you need to get current year Try this code :

alert((new Date()).getFullYear());

Commentaires

  1. Pingback: How to convert date into this 'yyyy-MM-dd' format in angular 2 » JavaTuto

  2. Pingback: Angular – routing with multiple query parameters » JavaTuto

Laisser un commentaire