Angular 8 – click event not firing inside ngFor when it is calling a service method

I have a ngFor loop that is calling a service to get the current list of items to be displayed.

Click events are not handled anywhere inside of this loop, but work normally outside of it.

The click events will fire inside the loop, if I replace the service method call (that returns an array of objects to display) with an inline number array:

Not working:

<ng-container *ngFor="let variable of designerService.getVariables();" >
     <div (click)="onClick()">doesn't work</div>
</ng-container>

Working:

<ng-container *ngFor="let index of [0,1,2,3,4,5]" >
     <div (click)="onClick()">works</div>
</ng-container>

Can anyone explain to me what the issue is?