I'm pretty sure that this is expected, given the protoypal inheritance of
child scopes from the parent. It's definitely odd now that you mention it,
but you can work around pretty easily by not shadowing scope variable
names, or by using an isolate scope.

e

On Fri, Sep 26, 2014 at 9:28 PM, Zane Sumpter <[email protected]> wrote:

> A directive with a new scope is having it's element attributes evaluated
> with the new scope rather than the parent scope as I would expect. Using
> isolate scope does not have this problem and the parent scope is used to
> evaluate the attributes. I tested this in 1.3.0-rc.3 and went back through
> older versions of 1.2 and realized they all behaved this way. I am not sure
> whether this is a defect, or intended, but it definitely wasn't what I
> expected, or would want.
>
> I created a plunkr to demonstrate the issue:
> http://plnkr.co/edit/frk08dWVgZpXfFhqPBKy?p=preview
>
> Can anyone tell me if this is expected behavior, and if so, what's the use
> case for it?
>
>
>  --
> You received this message because you are subscribed to the Google Groups
> "AngularJS" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/angular.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to