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

Parent scope not inherited within directive using ngRepeat and replace #12260

Closed
mike-jumper opened this issue Jul 2, 2015 · 3 comments
Closed

Comments

@mike-jumper
Copy link

While attempting to migrate from 1.2.x to 1.3.x, we have noticed that directives that use ngRepeat on their root element no longer properly inherit from the parent scope if replace is used. If the ngRepeat is not on the root element, or if replace is not used, scope inheritance works as expected.

jsFiddle demonstrating the issue: http://jsfiddle.net/z1h50wa1/

jsFiddle with the exact same code as above, but using 1.2.x: http://jsfiddle.net/00Lvrgxd/

@mike-jumper
Copy link
Author

A post on Stack Overflow regarding this issue indicates this may be a duplicate of #9837. They do seem to deal with the same ultimate effect - loss of the inherited scope.

@Narretz
Copy link
Contributor

Narretz commented Nov 11, 2015

The linked issue with ngIf and replace:true has been fixed, but it didn't fix this issue here. Oddly enough the inspectable scope structure looks correct (the repeat elements have the correct parent), but the inheritance is broken.
Still, as replace is deprecated, don't hold out for a fix.

@Narretz
Copy link
Contributor

Narretz commented Apr 6, 2018

Duplicate of #9837

@Narretz Narretz marked this as a duplicate of #9837 Apr 6, 2018
@Narretz Narretz closed this as completed Apr 6, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants