You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/content/error/controller/noscp.ngdoc
+17Lines changed: 17 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -2,3 +2,20 @@
2
2
@name $controller:noscp
3
3
@fullName Missing $scope object
4
4
@description
5
+
6
+
This error occurs when {@link api/ng.$controller $controller} service is called in order to instantiate a new controller but no scope is provided via `$scope` property of the locals map.
7
+
8
+
Example of incorrect usage that leads to this error:
9
+
```
10
+
$controller(MyController);
11
+
//or
12
+
$controller(MyController, {scope: newScope});
13
+
```
14
+
15
+
To fix the example above please provide a scope to the $controller call:
16
+
17
+
```
18
+
$controller(MyController, {$scope, newScope});
19
+
```
20
+
21
+
Please consult the {@link api/ng.$controller $controller} service api docs to learn more.
0 commit comments