fix(core): ensure ngFor only inserts/moves/removes elements when necessary (#10287)

Closes #9960
Closes #7239
Closes #9672
Closes #9454
Closes #10287
This commit is contained in:
Matias Niemelä
2016-08-01 11:09:52 -07:00
committed by GitHub
parent 4df7b1cfbc
commit e18626b7a2
10 changed files with 428 additions and 91 deletions

View File

@ -463,6 +463,7 @@ export declare class DefaultIterableDiffer implements IterableDiffer {
forEachIdentityChange(fn: Function): void;
forEachItem(fn: Function): void;
forEachMovedItem(fn: Function): void;
forEachOperation(fn: (item: CollectionChangeRecord, previousIndex: number, currentIndex: number) => void): void;
forEachPreviousItem(fn: Function): void;
forEachRemovedItem(fn: Function): void;
onDestroy(): void;
@ -1370,6 +1371,7 @@ export declare abstract class ViewContainerRef {
abstract get(index: number): ViewRef;
abstract indexOf(viewRef: ViewRef): number;
abstract insert(viewRef: ViewRef, index?: number): ViewRef;
abstract move(viewRef: ViewRef, currentIndex: number): ViewRef;
abstract remove(index?: number): void;
}