Skip to content

Conversation

lacolaco
Copy link
Contributor

Please check if the PR fulfills these requirements

What kind of change does this PR introduce? (check one with "x")

[ ] Bugfix
[ ] Feature
[ ] Code style update (formatting, local variables)
[x] Refactoring (no functional changes, no api changes)
[ ] Build related changes
[ ] CI related changes
[ ] Other... Please describe:

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

No documentation exists for ngForTrackBy

What is the new behavior?

Added

Does this PR introduce a breaking change? (check one with "x")

[ ] Yes
[x] No

If this PR contains a breaking change, please describe the impact and migration path for existing applications: ...

Other information:

In the plunker demo (http://plnkr.co/edit/KVuXxDp0qinGDyo307QW?p=preview), ngForTrackBy is not used. I think it also should be updated.

@@ -62,11 +62,22 @@ export class NgForRow {
* elements were deleted and all new elements inserted). This is an expensive operation and should
* be avoided if possible.
*
* To customize the default tracking algorithm, `NgFor` supports `ngForTrackBy` option.
* `ngForTrackBy` takes a function which has two arguments: `index` and `item`.
* If `ngForTrackBy` is given, Angular tracks changes by the return value of the function.
Copy link
Contributor

Choose a reason for hiding this comment

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

Use trackBy, wo prefix

@IgorMinar IgorMinar added pr_state: LGTM action: merge The PR is ready for merge by the caretaker labels Aug 16, 2016
@vikerman vikerman merged commit 3c23238 into angular:master Aug 17, 2016
@lacolaco lacolaco deleted the laco-doc-ngfortrackby branch August 17, 2016 03:06
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 9, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
action: merge The PR is ready for merge by the caretaker cla: yes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants