ng-repeat track by $index with custom directive #16332
Comments
Any chance u can be a bit more specific (or provide a reproduction sample)? |
I believe this is indeed expected behavior. Quoting the docs:
Putting it all together, what happens is that tracking by Since But I admit we are not doing a terribly good job explaining that in the docs 😁 |
what |
- deduplicate info between docs section and arguments - don't draw too much attention to track by ... - ... but highlight its drawbacks when used with one-time bindings - add example to show how tracking affects collection updates - clarify duplicates support for specific tracking expressions Closes angular#16332 Closes angular#16334
- deduplicate info between docs section and arguments - don't draw too much attention to track by $index ... - ... but highlight its drawbacks - add example to show how tracking affects collection updates - clarify duplicates support for specific tracking expressions Closes #16332 Closes #16334 Closes #16397
- deduplicate info between docs section and arguments - don't draw too much attention to track by $index ... - ... but highlight its drawbacks - add example to show how tracking affects collection updates - clarify duplicates support for specific tracking expressions Closes angular#16332 Closes angular#16334 Closes angular#16397
- deduplicate info between docs section and arguments - don't draw too much attention to track by $index ... - ... but highlight its drawbacks - add example to show how tracking affects collection updates - clarify duplicates support for specific tracking expressions Closes #16332 Closes #16334 Closes #16397
I'm submitting a ...
Current behavior:
After filtering and array that is being repeated and has a custom directive in each repeated element that has an isolated scope. The custom directive is not reinitiated.
I assume this is expected behaviour but can be confusing and should be made clearer as to what putting
track by $index
can do to your custom directives.Expected / new behavior:
NA
Minimal reproduction of the problem with instructions:
AngularJS version: 1.5.10
Browser: all
Anything else:
Could the docs be made more clear between the what Angular is doing when using
track by
and that using$index
with custom directives is not going to work.Check my response here for a break down of the issue
https://stackoverflow.com/a/47310734/2536454
The text was updated successfully, but these errors were encountered: