From 4c10d33eb4340d6df30e298d63f4d37c25aab65f Mon Sep 17 00:00:00 2001 From: Misko Hevery Date: Tue, 1 Nov 2011 14:27:22 -0700 Subject: refactor(api): cleaned up the externalization of angular API methods --- src/Angular.js | 28 ++++++++++++++++++++++++++++ src/AngularPublic.js | 26 +------------------------- 2 files changed, 29 insertions(+), 25 deletions(-) (limited to 'src') diff --git a/src/Angular.js b/src/Angular.js index 9b0c4e23..29199f9b 100644 --- a/src/Angular.js +++ b/src/Angular.js @@ -1015,6 +1015,34 @@ function assertArgFn(arg, name) { return arg; } +function publishExternalAPI(angular){ + extend(angular, { + // disabled for now until we agree on public name + //'annotate': annotate, + 'copy': copy, + 'extend': extend, + 'equals': equals, + 'forEach': forEach, + 'injector': createInjector, + 'noop':noop, + 'bind':bind, + 'toJson': toJson, + 'fromJson': fromJson, + 'identity':identity, + 'isUndefined': isUndefined, + 'isDefined': isDefined, + 'isString': isString, + 'isFunction': isFunction, + 'isObject': isObject, + 'isNumber': isNumber, + 'isArray': isArray, + 'version': version, + 'isDate': isDate, + 'lowercase': lowercase, + 'uppercase': uppercase + }); +} + /** * @ngdoc property diff --git a/src/AngularPublic.js b/src/AngularPublic.js index 3ed0eab7..600f1ef8 100644 --- a/src/AngularPublic.js +++ b/src/AngularPublic.js @@ -11,31 +11,7 @@ angularService('$browser', function($log, $sniffer) { }, {$inject: ['$log', '$sniffer']}); -extend(angular, { - // disabled for now until we agree on public name - //'annotate': annotate, - 'copy': copy, - 'extend': extend, - 'equals': equals, - 'forEach': forEach, - 'injector': createInjector, - 'noop':noop, - 'bind':bind, - 'toJson': toJson, - 'fromJson': fromJson, - 'identity':identity, - 'isUndefined': isUndefined, - 'isDefined': isDefined, - 'isString': isString, - 'isFunction': isFunction, - 'isObject': isObject, - 'isNumber': isNumber, - 'isArray': isArray, - 'version': version, - 'isDate': isDate, - 'lowercase': lowercase, - 'uppercase': uppercase -}); +publishExternalAPI(angular); //try to bind to jquery now so that one can write angular.element().read() //but we will rebind on bootstrap again. -- cgit v1.2.3