I am new to Angular 6. With the following code:
export class DateComponent implements OnInit {
currentDate: string = new Date().toDateString;
constructor() { }
ngOnInit() {
}
}
I am getting the following error, but I do not know what may be causing it.
error TS2322: Type '() => string' is not assignable to type 'string'.