Why Angular Uses NgModules With ESModules
一月份面试时遇到位面试官,他问道:为什么 Angular 至今依然坚持使用 NgModules 而不是 ESModules 呢?当时回答得比较肤浅,主要提到“Angular 对模块理念的重视与推崇,因而需要一套更好的机制解决模块的依赖问题,而这套机制遵循了控制反转原则并以依赖注入的方式实现,这是 ESModules 无法做到的”。
ZH
Caveats of ngVue: Using Vue2 Into AngularJS
The ngVue module allows you to use Vue components in AngularJS applications, making change detection efficient but complicated. AngularJS uses a dirty checking mechanism while VueJS uses a reactivity system. ngVue makes use of the reactivity system in the dirty checking mechanism, but has limitations in detecting changes to models. Solutions include using Vue.set() to add properties and Array.prototype.splice to mutate arrays.
EN