In my Angular material project. On one reactive form I need to dynamically add multiple autocomplete fields. All autocomplete fields have a different array of options prefetched from a service onInit.
Current static exmaple on StackBlitz.
My question is: how can What changes should I make to 1. make sure not to repeat the code in template and ts file, as you can see all the filter* observables and reparative template code is quickly getting out of hand. 2. dynamically add more fields based on data from the backend. Backend data will have information about the list of options, labels, placeholders, control name etc.