mirror of
https://github.com/Hopiu/angular.js.git
synced 2026-03-17 07:40:22 +00:00
25 lines
807 B
Text
25 lines
807 B
Text
@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 (`@&=`) with an optional local name.
|
|
|
|
```
|
|
myModule.directive('directiveName', function factory() {
|
|
return {
|
|
...
|
|
scope: {
|
|
'attrName': '@', // OK
|
|
'attrName2': '=localName', // OK
|
|
'attrName3': 'name', // ERROR: missing mode @&=
|
|
'attrName4': ' = name', // ERROR: extra spaces
|
|
'attrName5': 'name=', // ERROR: must be prefixed with @&=
|
|
}
|
|
...
|
|
}
|
|
});
|
|
```
|
|
|
|
Please refer to the {@link api/ng.$compile#description_comprehensive-directive-api_directive-definition-object
|
|
`scope` option} of the directive definition documentation to learn more about the API.
|