且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

什么是生产和发展模式之间angular2差异

更新时间:2021-09-13 22:57:30

在开发模式下,变化检测后第一次运行做了第二次立即运行,如果任何绑定值的第一和第二轮之间变化产生一个错误。这有助于找出错误的地方检查值有副作用或字段或函数不返回后续调用相同的值这有损Angulars变化检测。

In development mode, change detection does a 2nd run immediately after the first run and produces an error if any bound value has changed between the first and the second run. This helps to locate bugs where checking values has side-effects or fields or functions doesn't return the same value on subsequent calls which undermines Angulars change detection.