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

docs(ngRepeat): improve info about tracking #16397

Merged
merged 2 commits into from
Jan 17, 2018

Conversation

Narretz
Copy link
Contributor

@Narretz Narretz commented Jan 9, 2018

This is a follow-up to #16334 because I came to the conclusions that the relevant docs needed a bigger overhaul.

  • 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 #16332
Closes #16334

What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)
docs

What is the current behavior? (You can also link to an open issue here)

What is the new behavior (if this is a feature change)?

Does this PR introduce a breaking change?

Please check if the PR fulfills these requirements

  • The commit message follows our guidelines
  • Fix/Feature: Docs have been added/updated
  • Fix/Feature: Tests have been added; existing tests pass

Other information:

- 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
* ```
* All different types of tracking functions, their syntax, and and their support for duplicate
* items in collections can be found in the
* {@link ngRepeat#ngRepeat-arguments ngRepeat expression descriotion}.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo: description

* </div>
* When DOM elements are re-used, ngRepeat updates the scope for the element, which will
* automatically update any active bindings on the template. However, other
* functionality will not be updated, because it is a static at this point:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"a static" is a bit ambiguous here. Perhaps we could say "because the element is not recreated and recompiled"

Copy link
Contributor

@petebacondarwin petebacondarwin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Narretz Narretz merged commit 5071859 into angular:master Jan 17, 2018
@Narretz Narretz deleted the docs-ngRepeat-tracking branch January 17, 2018 11:01
Narretz added a commit to Narretz/angular.js that referenced this pull request Jan 17, 2018
- 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
Narretz added a commit that referenced this pull request Jan 17, 2018
- 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
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ng-repeat track by $index with custom directive
3 participants