aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--angularFiles.js11
-rw-r--r--src/Angular.js90
-rw-r--r--src/AngularPublic.js93
-rw-r--r--src/angular.suffix5
-rw-r--r--src/scenario/angular.suffix2
5 files changed, 100 insertions, 101 deletions
diff --git a/angularFiles.js b/angularFiles.js
index 1333e7df..2a102a18 100644
--- a/angularFiles.js
+++ b/angularFiles.js
@@ -1,6 +1,7 @@
angularFiles = {
'angularSrc': [
'src/Angular.js',
+ 'src/AngularPublic.js',
'src/JSON.js',
'src/Injector.js',
'src/Resource.js',
@@ -39,8 +40,7 @@ angularFiles = {
'src/widgets.js',
'src/widget/form.js',
'src/widget/input.js',
- 'src/widget/select.js',
- 'src/AngularPublic.js'
+ 'src/widget/select.js'
],
'angularScenario': [
@@ -87,8 +87,7 @@ angularFiles = {
'jstdExclude': [
'test/jquery_alias.js',
'src/angular-bootstrap.js',
- 'src/scenario/angular-bootstrap.js',
- 'src/AngularPublic.js'
+ 'src/scenario/angular-bootstrap.js'
],
'jstdScenario': [
@@ -119,8 +118,7 @@ angularFiles = {
'jstdPerfExclude': [
'src/angular-bootstrap.js',
- 'src/scenario/angular-bootstrap.js',
- 'src/AngularPublic.js'
+ 'src/scenario/angular-bootstrap.js'
],
'jstdJquery': [
@@ -148,7 +146,6 @@ angularFiles = {
'jstdJqueryExclude': [
'src/angular-bootstrap.js',
- 'src/AngularPublic.js',
'src/scenario/angular-bootstrap.js',
'test/jquery_remove.js'
]
diff --git a/src/Angular.js b/src/Angular.js
index deac0a41..127be95d 100644
--- a/src/Angular.js
+++ b/src/Angular.js
@@ -917,93 +917,3 @@ function assertArgFn(arg, name) {
(typeof arg == 'object' ? arg.constructor.name || 'Object' : typeof arg));
return arg;
}
-
-function publishExternalAPI(angular){
- extend(angular, {
- 'bootstrap': bootstrap,
- 'copy': copy,
- 'extend': extend,
- 'equals': equals,
- 'element': jqLite,
- 'forEach': forEach,
- 'injector': function(){ return createInjector(arguments, angularModule); },
- 'noop':noop,
- 'bind':bind,
- 'toJson': toJson,
- 'fromJson': fromJson,
- 'identity':identity,
- 'isUndefined': isUndefined,
- 'isDefined': isDefined,
- 'isString': isString,
- 'isFunction': isFunction,
- 'isObject': isObject,
- 'isNumber': isNumber,
- 'isElement': isElement,
- 'isArray': isArray,
- 'version': version,
- 'isDate': isDate,
- 'lowercase': lowercase,
- 'uppercase': uppercase
- });
-
- angularModule.ng = ngModule;
-}
-
-ngModule.$inject = ['$provide', '$injector'];
-function ngModule($provide, $injector) {
-// TODO(misko): temporary services to get the compiler working;
- $provide.value('$textMarkup', angularTextMarkup);
- $provide.value('$attrMarkup', angularAttrMarkup);
- $provide.value('$directive', angularDirective);
- $provide.value('$widget', angularWidget);
-
- // load the LOCALE if present
- $injector.invoke(null, angularModule.ngLocale || function(){
- $provide.service('$locale', $LocaleProvider);
- });
-
- $provide.service('$browser', $BrowserProvider);
- $provide.service('$compile', $CompileProvider);
- $provide.service('$cookies', $CookiesProvider);
- $provide.service('$cookieStore', $CookieStoreProvider);
- $provide.service('$defer', $DeferProvider);
- $provide.service('$document', $DocumentProvider);
- $provide.service('$exceptionHandler', $ExceptionHandlerProvider);
- $provide.service('$filter', $FilterProvider);
- $provide.service('$formFactory', $FormFactoryProvider);
- $provide.service('$location', $LocationProvider);
- $provide.service('$log', $LogProvider);
- $provide.service('$parse', $ParseProvider);
- $provide.service('$resource', $ResourceProvider);
- $provide.service('$route', $RouteProvider);
- $provide.service('$routeParams', $RouteParamsProvider);
- $provide.service('$rootScope', $RootScopeProvider);
- $provide.service('$sniffer', $SnifferProvider);
- $provide.service('$window', $WindowProvider);
- $provide.service('$xhr.bulk', $XhrBulkProvider);
- $provide.service('$xhr.cache', $XhrCacheProvider);
- $provide.service('$xhr.error', $XhrErrorProvider);
- $provide.service('$xhr', $XhrProvider);
-}
-
-
-/**
- * @ngdoc property
- * @name angular.version
- * @description
- * An object that contains information about the current AngularJS version. This object has the
- * following properties:
- *
- * - `full` – `{string}` – Full version string, such as "0.9.18".
- * - `major` – `{number}` – Major version number, such as "0".
- * - `minor` – `{number}` – Minor version number, such as "9".
- * - `dot` – `{number}` – Dot version number, such as "18".
- * - `codeName` – `{string}` – Code name of the release, such as "jiggling-armfat".
- */
-var version = {
- full: '"NG_VERSION_FULL"', // all of these placeholder strings will be replaced by rake's
- major: "NG_VERSION_MAJOR", // compile task
- minor: "NG_VERSION_MINOR",
- dot: "NG_VERSION_DOT",
- codeName: '"NG_VERSION_CODENAME"'
-};
diff --git a/src/AngularPublic.js b/src/AngularPublic.js
index 6403c4ff..66301104 100644
--- a/src/AngularPublic.js
+++ b/src/AngularPublic.js
@@ -1,7 +1,92 @@
'use strict';
-//try to bind to jquery now so that one can write angular.element().read()
-//but we will rebind on bootstrap again.
-bindJQuery();
+/**
+ * @ngdoc property
+ * @name angular.version
+ * @description
+ * An object that contains information about the current AngularJS version. This object has the
+ * following properties:
+ *
+ * - `full` – `{string}` – Full version string, such as "0.9.18".
+ * - `major` – `{number}` – Major version number, such as "0".
+ * - `minor` – `{number}` – Minor version number, such as "9".
+ * - `dot` – `{number}` – Dot version number, such as "18".
+ * - `codeName` – `{string}` – Code name of the release, such as "jiggling-armfat".
+ */
+var version = {
+ full: '"NG_VERSION_FULL"', // all of these placeholder strings will be replaced by rake's
+ major: "NG_VERSION_MAJOR", // compile task
+ minor: "NG_VERSION_MINOR",
+ dot: "NG_VERSION_DOT",
+ codeName: '"NG_VERSION_CODENAME"'
+};
+
+
+function publishExternalAPI(angular){
+ extend(angular, {
+ 'bootstrap': bootstrap,
+ 'copy': copy,
+ 'extend': extend,
+ 'equals': equals,
+ 'element': jqLite,
+ 'forEach': forEach,
+ 'injector': function(){ return createInjector(arguments, angularModule); },
+ 'noop':noop,
+ 'bind':bind,
+ 'toJson': toJson,
+ 'fromJson': fromJson,
+ 'identity':identity,
+ 'isUndefined': isUndefined,
+ 'isDefined': isDefined,
+ 'isString': isString,
+ 'isFunction': isFunction,
+ 'isObject': isObject,
+ 'isNumber': isNumber,
+ 'isElement': isElement,
+ 'isArray': isArray,
+ 'version': version,
+ 'isDate': isDate,
+ 'lowercase': lowercase,
+ 'uppercase': uppercase
+ });
+
+ angularModule.ng = ngModule;
+}
+
+ngModule.$inject = ['$provide', '$injector'];
+function ngModule($provide, $injector) {
+// TODO(misko): temporary services to get the compiler working;
+ $provide.value('$textMarkup', angularTextMarkup);
+ $provide.value('$attrMarkup', angularAttrMarkup);
+ $provide.value('$directive', angularDirective);
+ $provide.value('$widget', angularWidget);
+
+ // load the LOCALE if present
+ $injector.invoke(null, angularModule.ngLocale || function(){
+ $provide.service('$locale', $LocaleProvider);
+ });
+
+ $provide.service('$browser', $BrowserProvider);
+ $provide.service('$compile', $CompileProvider);
+ $provide.service('$cookies', $CookiesProvider);
+ $provide.service('$cookieStore', $CookieStoreProvider);
+ $provide.service('$defer', $DeferProvider);
+ $provide.service('$document', $DocumentProvider);
+ $provide.service('$exceptionHandler', $ExceptionHandlerProvider);
+ $provide.service('$filter', $FilterProvider);
+ $provide.service('$formFactory', $FormFactoryProvider);
+ $provide.service('$location', $LocationProvider);
+ $provide.service('$log', $LogProvider);
+ $provide.service('$parse', $ParseProvider);
+ $provide.service('$resource', $ResourceProvider);
+ $provide.service('$route', $RouteProvider);
+ $provide.service('$routeParams', $RouteParamsProvider);
+ $provide.service('$rootScope', $RootScopeProvider);
+ $provide.service('$sniffer', $SnifferProvider);
+ $provide.service('$window', $WindowProvider);
+ $provide.service('$xhr.bulk', $XhrBulkProvider);
+ $provide.service('$xhr.cache', $XhrCacheProvider);
+ $provide.service('$xhr.error', $XhrErrorProvider);
+ $provide.service('$xhr', $XhrProvider);
+}
-publishExternalAPI(angular);
diff --git a/src/angular.suffix b/src/angular.suffix
index d38d3130..99726fbd 100644
--- a/src/angular.suffix
+++ b/src/angular.suffix
@@ -1,3 +1,8 @@
+ //try to bind to jquery now so that one can write angular.element().read()
+ //but we will rebind on bootstrap again.
+ bindJQuery();
+
+ publishExternalAPI(angular);
var config = angularJsConfig(document);
diff --git a/src/scenario/angular.suffix b/src/scenario/angular.suffix
index 014c2cc9..a79fd270 100644
--- a/src/scenario/angular.suffix
+++ b/src/scenario/angular.suffix
@@ -1,3 +1,5 @@
+publishExternalAPI(angular);
+
var $runner = new angular.scenario.Runner(window),
config = angularJsConfig(document);