diff --git a/Rakefile b/Rakefile index e71fd0cf..512d1e73 100644 --- a/Rakefile +++ b/Rakefile @@ -109,6 +109,27 @@ task :compile => [:init, :compile_scenario, :compile_jstd_scenario_adapter] do --js_output_file #{path_to('angular.min.js')}) FileUtils.cp_r 'i18n/locale', path_to('i18n') + + File.open(path_to('angular-loader.js'), 'w') do |f| + concat = 'cat ' + [ + 'src/loader.prefix', + 'src/loader.js', + 'src/loader.suffix'].flatten.join(' ') + + content = %x{#{concat}}. + gsub('"NG_VERSION_FULL"', NG_VERSION.full). + gsub(/^\s*['"]use strict['"];?\s*$/, '') # remove all file-specific strict mode flags + + f.write(content) + end + + %x(java -jar lib/closure-compiler/compiler.jar \ + --compilation_level SIMPLE_OPTIMIZATIONS \ + --language_in ECMASCRIPT5_STRICT \ + --js #{path_to('angular-loader.js')} \ + --js_output_file #{path_to('angular-loader.min.js')}) + + end @@ -134,7 +155,9 @@ task :package => [:clean, :compile, :docs] do ['src/angular-mocks.js', path_to('angular.js'), + path_to('angular-loader.js'), path_to('angular.min.js'), + path_to('angular-loader.min.js'), path_to('angular-scenario.js'), path_to('jstd-scenario-adapter.js'), path_to('jstd-scenario-adapter-config.js'), diff --git a/angularFiles.js b/angularFiles.js index 8d35764b..889d7f52 100644 --- a/angularFiles.js +++ b/angularFiles.js @@ -1,6 +1,7 @@ angularFiles = { 'angularSrc': [ 'src/Angular.js', + 'src/loader.js', 'src/AngularPublic.js', 'src/JSON.js', 'src/Injector.js', diff --git a/docs/content/api/angular.module.ngdoc b/docs/content/api/angular.module.ngdoc deleted file mode 100644 index ccfec6b7..00000000 --- a/docs/content/api/angular.module.ngdoc +++ /dev/null @@ -1,54 +0,0 @@ -@ngdoc overview -@name angular.module -@description - -The angular.module namespace is a global place for registering angular modules. All modules -(angular core or 3rd party) that should be available to an application must be registered in this -namespace. - -# Module - -A module is a function that is used to register new service providers and configure existing -providers. Once a provider is registered, {@link angular.module.AUTO.$injector $injector} will use -it to ask for a service instance when it is resolving a dependency for the first time. - -
-// Declare the module configuration function.
-// The function arguments are fully injectable so that the module function
-// can create new providers or configure existing ones.
-function MyModule($provide, $locationProvider){
- // see $provide for more information.
- $provide.value('appName', 'MyCoolApp');
-
- // Configure existing providers
- $locationProvider.hashPrefix = '!';
-};
-
-
-See: {@link angular.module.AUTO.$provide $provide}, {@link angular.module.ng.$locationProvider $locationProvider}.
-
-# Registering Module Function
-
-In your JavaScript file:
-
-// Create the angular.module namespace if one does not exist
-// This allows the module code to be loaded before angular.js code.
-if (!window.angular) window.angular = {};
-if (!angular.module) angular.module = {};
-
-angular.module.MyModule = function(){
- // add configuration code here.
-};
-
-
-Then you can refer to your module like this:
-
-
-var injector = angular.injector('ng', 'MyModule')
-
-
-Or
-
-
-var injector = angular.injector('ng', angular.module.MyModule)
-
diff --git a/docs/content/guide/dev_guide.bootstrap.auto_bootstrap.ngdoc b/docs/content/guide/dev_guide.bootstrap.auto_bootstrap.ngdoc
index d461bfb4..ff14a703 100644
--- a/docs/content/guide/dev_guide.bootstrap.auto_bootstrap.ngdoc
+++ b/docs/content/guide/dev_guide.bootstrap.auto_bootstrap.ngdoc
@@ -2,88 +2,33 @@
@name Developer Guide: Initializing Angular: Automatic Initialization
@description
-Angular initializes automatically when you load the angular script into your page, specifying
-angular's `ng:autobind` attribute with no arguments:
+Angular initializes automatically when you load the angular script into your page that contains an element
+with `ng:app` directive:
-
+
+
+ I can add: {{ 1+2 }}.
+
+