This repository was archived by the owner on Apr 17, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 743
/
Copy path$compile:iscp.html
24 lines (24 loc) · 1.56 KB
/
$compile:iscp.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
<a href="http://github.com/angular/angular.js/edit/master/docs/content/error/compile/iscp.ngdoc" class="improve-docs btn btn-primary"><i class="icon-edit"> </i> Improve this doc</a><h1><code ng:non-bindable="">Invalid Isolate Scope Definition</code>
<div><span class="hint">error in component <code ng:non-bindable="">$compile</code>
</span>
</div>
</h1>
<div><pre class="minerr-errmsg" error-display="Invalid isolate scope definition for directive '{0}'. Definition: {... {1}: '{2}' ...}">Invalid isolate scope definition for directive '{0}'. Definition: {... {1}: '{2}' ...}</pre>
<h2 id="description">Description</h2>
<div class="description"><div class="-compile-page -compile-iscp-page"><p>When declaring isolate scope the scope definition object must be in specific format which starts with mode character (<code>@&=</code>) with an optional local name.</p>
<pre><code>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 @&=
}
...
}
});</code></pre>
<p>Please refer to the <a href="api/ng.$compile#description_comprehensive-directive-api_directive-definition-object"><code><code>scope</code> option</code></a> of the directive definition documentation to learn more about the API.</p>
</div></div>
</div>