Angular-HMR
Angular-HMR copied to clipboard
Infinite call loop while hot updating controller
Hi, I've just set this project up with Angular HMR.
As a side note, since the example calls the global Angular variable
Angular
instead ofangular
, I had to change theangularModule
regexp inangular-hmr/index.js
to accept this variable name
var angularModule= /[aA]ngular[\.\n ]+module\(([\'\"\w\.\/\(\)\n\-\,\[\] ]+)\)/g;
BTW, should we address this case in another issue?
So, when I try to hot update a controller (e.g. page3Controller.js
), I get no hot reload and the following error Uncaught RangeError: Maximum call stack size exceeded
. The infinitely-called function is hotAddUpdateChunk
.
Thats odd they would change the global to Angular, is there any particular reason they did that?
I don't think so. They just did it like that...