mirror of
https://github.com/Hopiu/angular.js.git
synced 2026-03-17 15:40:22 +00:00
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
|
||
|---|---|---|
| .. | ||
| bootstrap.ngdoc | ||
| compiler.ngdoc | ||
| concepts.ngdoc | ||
| dev_guide.e2e-testing.ngdoc | ||
| dev_guide.mvc.ngdoc | ||
| dev_guide.mvc.understanding_controller.ngdoc | ||
| dev_guide.mvc.understanding_model.ngdoc | ||
| dev_guide.mvc.understanding_view.ngdoc | ||
| dev_guide.services.$location.ngdoc | ||
| dev_guide.services.creating_services.ngdoc | ||
| dev_guide.services.injecting_controllers.ngdoc | ||
| dev_guide.services.managing_dependencies.ngdoc | ||
| dev_guide.services.ngdoc | ||
| dev_guide.services.testing_services.ngdoc | ||
| dev_guide.services.understanding_services.ngdoc | ||
| dev_guide.templates.css-styling.ngdoc | ||
| dev_guide.templates.databinding.ngdoc | ||
| dev_guide.templates.filters.creating_filters.ngdoc | ||
| dev_guide.templates.filters.ngdoc | ||
| dev_guide.templates.filters.using_filters.ngdoc | ||
| dev_guide.templates.ngdoc | ||
| dev_guide.unit-testing.ngdoc | ||
| di.ngdoc | ||
| directive.ngdoc | ||
| expression.ngdoc | ||
| forms.ngdoc | ||
| i18n.ngdoc | ||
| ie.ngdoc | ||
| index.ngdoc | ||
| introduction.ngdoc | ||
| module.ngdoc | ||
| overview.ngdoc | ||
| scope.ngdoc | ||
| type.ngdoc | ||