@@ -321,24 +321,26 @@ compiler}. The attributes are:
321
321
derived from the parent scope. These local properties are useful for aliasing values for
322
322
templates. Locals definition is a hash of local scope property to its source:
323
323
324
- * `@` or `@attr` - bind a local scope property to the DOM attribute. The result is always a
325
- string since DOM attributes are strings. If no `attr` name is specified then the local name
326
- and attribute name are same. Given `<widget my-attr="hello {{name}}">` and widget definition
324
+ * `@` or `@attr` - bind a local scope property to the value of DOM attribute. The result is
325
+ always a string since DOM attributes are strings. If no `attr` name is specified then the
326
+ attribute name is assumed to be the same as the local name.
327
+ Given `<widget my-attr="hello {{name}}">` and widget definition
327
328
of `scope: { localName:'@myAttr' }`, then widget scope property `localName` will reflect
328
329
the interpolated value of `hello {{name}}`. As the `name` attribute changes so will the
329
330
`localName` property on the widget scope. The `name` is read from the parent scope (not
330
331
component scope).
331
332
332
- * `=` or `=expression` - set up bi-directional binding between a local scope property and the
333
- parent scope property. If no `attr` name is specified then the local name and attribute
334
- name are same. Given `<widget my-attr="parentModel">` and widget definition of
335
- `scope: { localModel:'=myAttr' }`, then widget scope property `localName` will reflect the
333
+ * `=` or `=attr` - set up bi-directional binding between a local scope property and the
334
+ parent scope property of name defined via the value of the `attr` attribute. If no `attr`
335
+ name is specified then the attribute name is assumed to be the same as the local name.
336
+ Given `<widget my-attr="parentModel">` and widget definition of
337
+ `scope: { localModel:'=myAttr' }`, then widget scope property `localModel` will reflect the
336
338
value of `parentModel` on the parent scope. Any changes to `parentModel` will be reflected
337
339
in `localModel` and any changes in `localModel` will reflect in `parentModel`.
338
340
339
341
* `&` or `&attr` - provides a way to execute an expression in the context of the parent scope.
340
- If no `attr` name is specified then the local name and attribute name are same.
341
- Given `<widget my-attr="count = count + value">` and widget definition of
342
+ If no `attr` name is specified then the attribute name is assumed to be the same as the
343
+ local name. Given `<widget my-attr="count = count + value">` and widget definition of
342
344
`scope: { localFn:'&myAttr' }`, then isolate scope property `localFn` will point to
343
345
a function wrapper for the `increment()` expression. Often it's desirable to pass data from
344
346
the isolate scope via an expression and to the parent scope, this can be done by passing a
0 commit comments