Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Commit 9faabd1

Browse files
matskomhevery
authored andcommitted
chore(AngularPublic): remove angular.noConflict feature
1 parent 65f5e85 commit 9faabd1

File tree

3 files changed

+1
-42
lines changed

3 files changed

+1
-42
lines changed

src/Angular.js

-18
Original file line numberDiff line numberDiff line change
@@ -63,24 +63,6 @@ var /** holds major version number for IE or NaN for real browsers */
6363
nodeName_,
6464
uid = ['0', '0', '0'];
6565

66-
/**
67-
* @ngdoc function
68-
* @name angular.noConflict
69-
* @function
70-
*
71-
* @description
72-
* Restores the previous global value of angular and returns the current instance. Other libraries may already use the
73-
* angular namespace. Or a previous version of angular is already loaded on the page. In these cases you may want to
74-
* restore the previous namespace and keep a reference to angular.
75-
*
76-
* @return {Object} The current angular namespace
77-
*/
78-
function noConflict() {
79-
var a = window.angular;
80-
window.angular = _angular;
81-
return a;
82-
}
83-
8466
/**
8567
* @private
8668
* @param {*} obj

src/AngularPublic.js

+1-2
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,7 @@ function publishExternalAPI(angular){
4848
'isDate': isDate,
4949
'lowercase': lowercase,
5050
'uppercase': uppercase,
51-
'callbacks': {counter: 0},
52-
'noConflict': noConflict
51+
'callbacks': {counter: 0}
5352
});
5453

5554
angularModule = setupModuleLoader(window);

test/AngularSpec.js

-22
Original file line numberDiff line numberDiff line change
@@ -877,26 +877,4 @@ describe('angular', function() {
877877
}));
878878
});
879879

880-
describe('noConflict', function() {
881-
var globalAngular;
882-
beforeEach(function() {
883-
globalAngular = angular;
884-
});
885-
886-
afterEach(function() {
887-
angular = globalAngular;
888-
});
889-
890-
it('should return angular', function() {
891-
var a = angular.noConflict();
892-
expect(a).toBe(globalAngular);
893-
});
894-
895-
it('should restore original angular', function() {
896-
var a = angular.noConflict();
897-
expect(angular).toBeUndefined();
898-
});
899-
900-
});
901-
902880
});

0 commit comments

Comments
 (0)