**Note:** These `=attr` attributes in the `scope` option of directives are normalized just like
@@ -449,12 +452,12 @@ For cases where the attribute name is the same as the value you want to bind to
directive's scope, you can use this shorthand syntax:
```javascript
-//...
+...
scope: {
- // same as '=customer'
+ // same as '=customer'
customer: '='
},
-//...
+...
```
Besides making it possible to bind different data to the scope inside a directive, using an isolated
@@ -475,7 +478,7 @@ within our directive's template:
return {
restrict: 'E',
scope: {
- customer: '=customer'
+ customerInfo: '=info'
},
templateUrl: 'my-customer-plus-vojta.html'
};
@@ -483,11 +486,11 @@ within our directive's template:
-
+
- Name: {{customer.name}} Address: {{customer.address}}
+ Name: {{customerInfo.name}} Address: {{customerInfo.address}}
Name: {{vojta.name}} Address: {{vojta.address}}
--
cgit v1.2.3