Skip to content
This repository has been archived by the owner on Oct 1, 2023. It is now read-only.

Added support for expressions in attributes #12

Merged
merged 1 commit into from
Apr 25, 2014

Conversation

aaronroberson
Copy link
Contributor

Added support for expressions in spinner-key attribute (i.e. spinner-key="{{spinnerKey}}") Attributes exposed to the controller of a directive will not interpolate expressions. If an expression is provided for an attribute that is being passed into the controller the only way to interpolate it is to use $attrs.$observe() or $scope.$eval() which is evil.

According to the Angular documentation, it is a best practice to "use controller when you want to expose an API to other directives. Otherwise use link." (see: https://docs.angularjs.org/guide/directive (very bottom of the page).

Added support for expressions in spinner-key attribute (i.e. spinner-key="{{spinnerKey}}") Attributes exposed to the controller of a directive will not interpolate expressions. If an expression is provided for an attribute that is being passed into the controller the only way to interpolate it is to use $attrs.$observe() or $scope.$eval() which is evil.

According to the Angular documentation, it is a best practice to "use controller when you want to expose an API to other directives. Otherwise use link." (see: https://docs.angularjs.org/guide/directive (very bottom of the page).
urish added a commit that referenced this pull request Apr 25, 2014
Added support for expressions in attributes
@urish urish merged commit c4dae9e into urish:master Apr 25, 2014
@urish
Copy link
Owner

urish commented Apr 25, 2014

Thanks @aaronroberson !

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants