forked from angular/angular.js
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathiscp.ngdoc
27 lines (24 loc) · 908 Bytes
/
iscp.ngdoc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
@ngdoc error
@name $compile:iscp
@fullName Invalid Isolate Scope Definition
@description
When declaring isolate scope the scope definition object must be in specific format which starts with mode character (`@&=<`), after which comes an optional `?`, and it ends with an optional local name.
```
myModule.directive('directiveName', function factory() {
return {
...
scope: {
'localName': '@', // OK
'localName2': '=attr', // OK
'localName3': '<?attr', // OK
'localName4': ' = attr', // OK
'localName5': 'attr', // ERROR: missing mode @&=
'localName6': 'attr=', // ERROR: must be prefixed with @&=
'localName7': '=attr?', // ERROR: ? must come directly after the mode
}
...
}
});
```
Please refer to the {@link ng.$compile#directive-definition-object
`scope` option} of the directive definition documentation to learn more about the API.