有没有办法在不添加onPush的情况下禁用mousemove上的更改检测?
答案 0 :(得分:4)
您可以在import 'zone.js/dist/zone'
(window as any).__zone_symbol__BLACK_LISTED_EVENTS = ['mousemove'];
import 'zone.js/dist/zone';
中添加此代码
function decodeHtml(html) {
var txt = document.createElement("textarea");
txt.innerHTML = html;
return txt.value;
}
另见