html: <input [(ngModel)]="timestamp"> <button (click)="getInstantDetails()">display</button> component.ts timestamp: any; getInstantDetails(): void { console.log(this.timestamp); } app.module.ts import {FormsModule} from '@angular/forms'; @NgModule({ declarations: [ AppComponent ], imports: [ BrowserModule, HttpClientModule, FormsModule, ], providers: [SchedulerService], bootstrap: [AppComponent] }) export class AppModule { } I'm getting timestamp value as undefined. is there anything I'm missing here.? Continue reading...