I'm perusing the AngularJS source code and couldn't help but notice the following:
_angular = window.angular,
/** @name angular */
angular = window.angular || (window.angular = {}),
This line makes sense to me:
angular = window.angular || (window.angular = {}),
"Use angular if already defined (from a previous inclusion?) in window, or assign window.angular to an empty object and set angular local variable to window.angular."
Some questions:
Going through the commit history on GitHub, this is for noConflict
mode, the case where you have an old reference to a variable called angular
you want to preserve.
Here is the commit that added _angular
in.
The feature was then removed in this commit and the _angular
reference is redundant at this point.
I'll raise an issue on GH or make a pull request shortly. Update - made a PR.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With