angular / batarang

AngularJS WebInspector Extension for Chrome
MIT License
2.43k stars 338 forks source link

Cannot read property 'invoke' of undefined #182

Closed spalger closed 9 years ago

spalger commented 9 years ago

Apparently batarang is now overriding methods on the angular object, which I'm not entirely against but it shouldn't be hard to make them work they way they originally did.

Consider using sinon spies, or an ES6 Proxy shim instead.

This line of code is producing the "Cannot read property 'invoke' of undefined" mentioned in the title.

btford commented 9 years ago

Can you please provide a runnable reproduction via jsbin, plnkr.co, or jsfiddle? This saves me a lot of time. Thanks!

spalger commented 9 years ago

I've setup an example plunkr but you will need to preview the plunkr in full screen to inject batarang properly.

I didn't really explain this in the original description, but the issue is simply that enabling batarang causes angular.bootstrap() to not return an $injector like it is supposed to.

image

SomeKittens commented 9 years ago

Duplicate of https://github.com/angular/batarang/issues/163

Angular proper doesn't support this, sorry.