(click) broken inside *ngFor on elements of type array if coming from a function

前端 未结 2 536
臣服心动
臣服心动 2021-01-21 10:19

in plnkr I\'ve reproduced a strange edge case. It probably depends on pixijs or perhaps on webgl as it happens when using pixijs.

Notice how you can click on all the

2条回答
  •  温柔的废话
    2021-01-21 10:45

    Interesting, you are getting infinite change loop. I happens because each time you return new array from ns() AND PIXI.autoDetectRenderer somehow triggers angular change event.

    Tried to set changeDetection:ChangeDetectionStrategy.OnPush - it works. So i guess angular detects periodic changes in renderer object and starts processing changes and can not stop since every time template value != ns() method result.

提交回复
热议问题