I'm binding an input tag's value to an ngmodel.
<input type="text" id="Fname" value="{{getProfile.firstname}}" placeholder="FirstName" #FirstName/>
Here is my typescript component
export class EditprofileComponent implements OnInit {
getProfile: Profile;
constructor(private profileService: ProfileService)
ngOnInit() {
this.profileService.getProfile().subscribe(data =>{
this.getProfile = data;
console.log(data);
})
}
When I use console.log(data). The console writes out an object of type Profile. So I'm getting the correct data.
I've done this same exact thing with the ngFor directive. But it's not working for a regular input value.
How do I bind the Profiles first name as the value for the input tag?