I've worked out that I can create dynamic ngModel variables using this method. This works great because I'm trying to generate a bunch of text inputs based on a list and then put an ngModel variable on them. The problem I'm running into is I want to assign an initial value to the textbox so it displays this value (as well as being the value for the ngModel) and then obviously the user can type in the box, changing the value of the ngModel variable.
I can't work out a way to do this though. If I set a value for the input it's simply cleared. It also needs to be done with ngModel rather than 2 way data binding (the {{}} method) because I need to be able to reference the variable later.
Below is my attempt to get it to work. You can assume "items" is a list of string values.
<ul>
<li *ngFor = "let item of items">
<input type = "text" [(ngModel)] = "input[item]" value = '{{item}}'>
</li>
</ul>
I'm also very new to Angular and web dev in general so I could just be missing something very obvious and if that's the case I apologise. Regardless I'd really appreciate any help.