Angular-HMR icon indicating copy to clipboard operation
Angular-HMR copied to clipboard

Infinite call loop while hot updating controller

Open xbill82 opened this issue 8 years ago • 2 comments

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 of angular, I had to change the angularModule regexp in angular-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.

xbill82 avatar Mar 14 '16 15:03 xbill82

Thats odd they would change the global to Angular, is there any particular reason they did that?

yargalot avatar Mar 18 '16 03:03 yargalot

I don't think so. They just did it like that...

xbill82 avatar Mar 21 '16 11:03 xbill82