Attributes
ng
A shared object between directive compile / linking functions which contains normalized DOM
element attributes. The values reflect current binding state {{ }}. The normalization is
needed since all of these are treated as equivalent in Angular:
Adds the CSS class value specified by the classVal parameter to the element. If animations are enabled then an animation will be triggered for the class addition.
| Param | Type | Details |
|---|---|---|
| classVal | string | The className value that will be added to the element |
Observes an interpolated attribute.
The observer function will be invoked once during the next $digest following
compilation. The observer is then invoked whenever the interpolated value
changes.
| Param | Type | Details |
|---|---|---|
| key | string | Normalized key. (ie ngAttribute) . |
| fn | function(interpolatedValue | Function that will be called whenever the interpolated value of the attribute changes. See the Directives guide for more info. |
| function() | the |
Removes the CSS class value specified by the classVal parameter from the element. If animations are enabled then an animation will be triggered for the class removal.
| Param | Type | Details |
|---|---|---|
| classVal | string | The className value that will be removed from the element |
| object | A map of DOM element attribute names to the normalized name. This is needed to do reverse lookup from normalized name back to actual name. |