From 9faabd1ba0b1929785bcf166dc0ff60008e7c442 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matias=20Niemel=C3=A4?= Date: Wed, 5 Jun 2013 18:12:00 -0400 Subject: [PATCH] chore(AngularPublic): remove angular.noConflict feature --- src/Angular.js | 18 ------------------ src/AngularPublic.js | 3 +-- test/AngularSpec.js | 22 ---------------------- 3 files changed, 1 insertion(+), 42 deletions(-) diff --git a/src/Angular.js b/src/Angular.js index 952e7a1d41a9..c9b6d530f15a 100644 --- a/src/Angular.js +++ b/src/Angular.js @@ -63,24 +63,6 @@ var /** holds major version number for IE or NaN for real browsers */ nodeName_, uid = ['0', '0', '0']; -/** - * @ngdoc function - * @name angular.noConflict - * @function - * - * @description - * Restores the previous global value of angular and returns the current instance. Other libraries may already use the - * angular namespace. Or a previous version of angular is already loaded on the page. In these cases you may want to - * restore the previous namespace and keep a reference to angular. - * - * @return {Object} The current angular namespace - */ -function noConflict() { - var a = window.angular; - window.angular = _angular; - return a; -} - /** * @private * @param {*} obj diff --git a/src/AngularPublic.js b/src/AngularPublic.js index 8330c0679f93..53ad5aabfb4f 100755 --- a/src/AngularPublic.js +++ b/src/AngularPublic.js @@ -48,8 +48,7 @@ function publishExternalAPI(angular){ 'isDate': isDate, 'lowercase': lowercase, 'uppercase': uppercase, - 'callbacks': {counter: 0}, - 'noConflict': noConflict + 'callbacks': {counter: 0} }); angularModule = setupModuleLoader(window); diff --git a/test/AngularSpec.js b/test/AngularSpec.js index de0296239231..790f605a7f23 100644 --- a/test/AngularSpec.js +++ b/test/AngularSpec.js @@ -877,26 +877,4 @@ describe('angular', function() { })); }); - describe('noConflict', function() { - var globalAngular; - beforeEach(function() { - globalAngular = angular; - }); - - afterEach(function() { - angular = globalAngular; - }); - - it('should return angular', function() { - var a = angular.noConflict(); - expect(a).toBe(globalAngular); - }); - - it('should restore original angular', function() { - var a = angular.noConflict(); - expect(angular).toBeUndefined(); - }); - - }); - });