Skip to content
This repository has been archived by the owner on Apr 12, 2024. It is now read-only.

directive attribute evaluation inconsistent between defined & undefined attributes #1104

Closed
leefernandes opened this issue Jun 29, 2012 · 1 comment

Comments

@leefernandes
Copy link
Contributor

You don't use $parent.prop with @attributes defined in the directive scope definition, but if an attribute isn't defined in scope definition, then you need to use $parent. This is confusing/inconsistent.

http://jsfiddle.net/ItsLeeOwen/UYkJP/

I don't know that I'd ever use an inline attribute to access an isolated scope property, in all of my use cases they've been to access parent scope properties. Whatever the intent, it would be ideal if these were consistent.

@pkozlowski-opensource
Copy link
Member

@itsleeowen this is a "known" issue that was reported already in #836, #1166 and fixed: #1494
It will make it to the next release, in the meantime you can grab the latest master build from
http://ci.angularjs.org/view/AngularJS/job/angular.js-angular-master/ws/build/

Here is your jsFiddle with the latest AngularJS from master: http://jsfiddle.net/HPAQA/

Closing for now as the duplicate of:

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

No branches or pull requests

2 participants