I am currently working on an Angular project and would like to be able to reuse my form components for both the creating and updating of entities.
For example, I have a User entity on a remote API and I have a form on the front end that allows me to create these users and POST the input to the server. This works great!
The issue begins when trying to use the same form for updating. I need to fill the form input fields with the stored information from the remote server by making a GET request. The issue is that the form component loads before the REST request Observable responds with the User entity.
How can I fill a form with information from a remote server before the form is fully loaded?