Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

angular current year

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

// In HTML file
<div> {{ currentYear }}. All rights reserved </div>
 
PREVIOUS NEXT
Tagged: #angular #current #year
ADD COMMENT
Topic
Name
6+3 =