AngularJS : window.angular variable
问题 I was looking for informations to window.angular variable and i found nothing expect this post. In this post we have the following code : (function(angular, undefined){ 'use script'; var djng_forms_module = angular.module('ng.django.forms', []); funtion hasCode(s){ return ..... } var foo = ..... }(window.angular)); And a person explains that when we use this code fragment it ensures that it is executed after the population of the variable window.angular . I don't understand why it could not