как поправить?
public shiftfocus(index: number): void {
const indexKey = `${index}`;
if(this.compoundStringFormGroup?.get(indexKey).value.length === 0){
let previndexKey = `${index - 1}`;
@ViewChild(previndexKey) elindexKey: ElementRef;
elindexKey.focus()
}
}
<ng-template #widgetContent>
<div class="compound-string-container">
<div *ngIf="compoundStringFormGroup" class="compound-string-wrapper">
<ng-container *ngFor="let part of numOfStringParts; let i=index">
<gas-input
[attr.id]="i"
class="compound-string"
[formControl]="getPartControlByIndex(i)"
[nativeDisabled]="!!field?.readonly"
[required]="field?.readonly ? false : !!field?.mandatory"
(keydown.backspace)="shiftfocus(i)"
></gas-input>
</ng-container>
</div>
</div>
</ng-template>