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

Commit 828f8a6

Browse files
jbedardgkalpak
authored andcommitted
docs($controller): deprecate the use of $controllerProvider#allowGlobals
Closes #15230
1 parent f5f802c commit 828f8a6

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

src/ng/controller.js

+4-1
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,9 @@ function $ControllerProvider() {
5959
* @ngdoc method
6060
* @name $controllerProvider#allowGlobals
6161
* @description If called, allows `$controller` to find controller constructors on `window`
62+
*
63+
* @deprecated
64+
* This method of finding controllers has been deprecated. This will be removed in 1.7.
6265
*/
6366
this.allowGlobals = function() {
6467
globals = true;
@@ -79,7 +82,7 @@ function $ControllerProvider() {
7982
* * check if a controller with given name is registered via `$controllerProvider`
8083
* * check if evaluating the string on the current scope returns a constructor
8184
* * if $controllerProvider#allowGlobals, check `window[constructor]` on the global
82-
* `window` object (not recommended)
85+
* `window` object (deprecated, not recommended)
8386
*
8487
* The string can use the `controller as property` syntax, where the controller instance is published
8588
* as the specified property on the `scope`; the `scope` must be injected into `locals` param for this

src/ng/directive/ngController.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
*
3434
* If the current `$controllerProvider` is configured to use globals (via
3535
* {@link ng.$controllerProvider#allowGlobals `$controllerProvider.allowGlobals()` }), this may
36-
* also be the name of a globally accessible constructor function (not recommended).
36+
* also be the name of a globally accessible constructor function (deprecated, not recommended).
3737
*
3838
* @example
3939
* Here is a simple form for editing user contact information. Adding, removing, clearing, and

src/ngMock/angular-mocks.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -2225,7 +2225,7 @@ angular.mock.$RootElementProvider = function() {
22252225
* * check if a controller with given name is registered via `$controllerProvider`
22262226
* * check if evaluating the string on the current scope returns a constructor
22272227
* * if $controllerProvider#allowGlobals, check `window[constructor]` on the global
2228-
* `window` object (not recommended)
2228+
* `window` object (deprecated, not recommended)
22292229
*
22302230
* The string can use the `controller as property` syntax, where the controller instance is published
22312231
* as the specified property on the `scope`; the `scope` must be injected into `locals` param for this

0 commit comments

Comments
 (0)