Open DrewML opened 9 years ago
We can try using using angular.element(document.body).injector().get('$rootScope') to get the rootscope when debugInfoEnabled(false). See http://stackoverflow.com/questions/24595460/how-to-access-update-rootscope-from-outside-angular
This is regarding the issue reported in #69.
I was reading through the Angular docs tonight, and I noticed this interested piece of info:
I think it would be awesome if we supported this use-case. Debugging production applications is certainly useful, and the docs mention that enabling this feature results in a "significant performance boost."
The problem: Having debug info disabled exhibits the exact same behavior that bootstrapping on an element with transclusion causes(issue #84, #57). The behavior is that the
$injector
is not accessible from thedata
getter on anangular.element
object. This makes it impossible (from what I can tell) to determine if the user actually has debug info disabled or not.I'm logging this issue now, in hopes that we can find a solution at some point to better notify the end-user. I'll take a look at how
Batarang
handles it. If it causes issues withBatarang
as well, maybe we can attempt to convince the Angular team to expose whether or not the app is in debug mode.