Input default value

Input is part of a component so you just set default value in that component…
As RaulGM mentioned server doesn’t return response data immediately… it takes a few milliseconds to get the data from a server but alert happens immediately… so you have to wait until server returns that data and then you can set it to the input or alert it…

If you look at my example code above you can see .then() function and inside of this function I use response data and set it to the input through member variable… So this should work… I don’t understand why you need to set firstname directly on the input… When you set it to a member variable and “assign” that variable to the input through [(ngModel)]=“firstname” it should populate the input immediately after server returns expected data…