Answers for "angular get year"

2

angular current year

// In component file
export class SomeComponent {
  currentYear: number = new Date().getFullYear();
}

// In HTML file
<div> {{ currentYear }}. All rights reserved </div>
Posted by: Guest on November-27-2020

Code answers related to "Javascript"

Browse Popular Code Answers by Language