Expression has changed after it was checked. Previous value: '3'. Current value: '2'.

连续多次修改一个属性值,onchanges会检测到并且报如下的错,

Expression has changed after it was checked. Previous value: '3'. Current value: '2'.

解决方法如下:

在main.ts中加入如下:

import{enableProdMode}from'@angular/core';

if(process.env.ENV==='production') {

        enableProdMode();

}

你可能感兴趣的:(Expression has changed after it was checked. Previous value: '3'. Current value: '2'.)