# `Attributes` (type in module `ng` )

Improve this doc

## Description

A shared object between directive compile / linking functions which contains normalized DOM element attributes. The the values reflect current binding state `{{ }}`. The normalization is needed since all of these are treated as equivalent in Angular:

         <span ng:bind="a" ng-bind="a" data-ng-bind="a" x-ng-bind="a">

## Methods

- ### $set(name, value)

  Set DOM element attribute value.

  #### Parameters

  - `name – {string} –`

    Normalized element attribute name of the property to modify. The name is revers translated using the `$attr` property to the original name.

  - `value – {string} –`

    Value to set the attribute to. The value can be an interpolated string.

## Properties

- ### $attr

  #### Returns

  `{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.