Open rev087 opened 9 years ago
Is this something that you already know works, and just want a test to guard against it, or are you actually looking to verify whether we handle this case?
I havent tested it, but it almost certainly won't work, so maybe just writing a test would be silly. I wrote this issue quickly diring the last meeting.
I have a theory for how we could address this. We'd basically need to change our mechanism we use for capturing angular's bootstrap method.
Instead of using mutation observers to listen for scripts being appended to the page, we could just configure window.angular
to be a getter/setter. In that scenario, when the Angular lib loads and tries to assign to window.angular
, our setter would catch it, swap the bootstrap method (as we do now), and then store a reference to the original angular object, that can be exposed through the getter.
I may hack up an example at some point just to play around with, and see if there are any obvious gotchas I'm not considering.
Create a test with manual bootstrap done in the same file that bundles angular itself.