get this year in angular 9 code example
Example: angular current year
// In component file
export class SomeComponent {
currentYear: number = new Date().getFullYear();
}
// In HTML file
<div> {{ currentYear }}. All rights reserved </div>
// In component file
export class SomeComponent {
currentYear: number = new Date().getFullYear();
}
// In HTML file
<div> {{ currentYear }}. All rights reserved </div>