连续多次修改一个属性值,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();
}
连续多次修改一个属性值,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();
}