angular.js/docs/content
Luis Ramón López cf17c6af47 feat($compile): add attribute binding support via ngAttr*
Sometimes is not desirable to use interpolation on attributes because
the user agent parses them before the interpolation takes place. I.e:

<svg>
  <circle cx="{{cx}}" cy="{{cy}}" r="{{r}}"></circle>
</svg>

The snippet throws three browser errors, one for each attribute.

For some attributes, AngularJS fixes that behaviour introducing special
directives like ng-href or ng-src.

This commit is a more general solution that allows prefixing any
attribute with "ng-attr-", "ng:attr:" or "ng_attr_"  so it will
be set only when the binding is done. The prefix is then removed.

Example usage:

<svg>
  <circle ng-attr-cx="{{cx}}" ng-attr-cy="{{cy}}" ng:attr-r="{{r}}"></circle>
</svg>

Closes #1050
Closes #1925
2013-02-27 00:55:40 -08:00
..
api docs(module): fixed module example and corrected typos 2012-09-06 16:06:23 -07:00
cookbook docs(cookbook): change prototype methods to scope methods in Buzz 2013-01-18 00:49:41 -05:00
guide feat($compile): add attribute binding support via ngAttr* 2013-02-27 00:55:40 -08:00
misc docs(contributing): add CLA anchor for deeplinking 2013-02-04 09:38:01 -08:00
tutorial docs(tutorial): remove extra back-tick character 2013-02-06 21:51:42 +01:00