refactor(common): Remove ngOnChanges from NgForOf (#23378)
`NgForOf` used to implement `OnChanges` and than use `ngOnChanges` callback to detect when `ngForOf` binding changed to update the differ. We now do the checking manually which puts less pressure on the runtime to do the bookkeeping and should result in minor perf improvement. PR Close #23378
This commit is contained in:

committed by
Victor Berchet

parent
255463ed48
commit
08a18b82de
3
tools/public_api_guard/common/common.d.ts
vendored
3
tools/public_api_guard/common/common.d.ts
vendored
@ -240,13 +240,12 @@ export declare class NgComponentOutlet implements OnChanges, OnDestroy {
|
||||
ngOnDestroy(): void;
|
||||
}
|
||||
|
||||
export declare class NgForOf<T> implements DoCheck, OnChanges {
|
||||
export declare class NgForOf<T> implements DoCheck {
|
||||
ngForOf: NgIterable<T>;
|
||||
ngForTemplate: TemplateRef<NgForOfContext<T>>;
|
||||
ngForTrackBy: TrackByFunction<T>;
|
||||
constructor(_viewContainer: ViewContainerRef, _template: TemplateRef<NgForOfContext<T>>, _differs: IterableDiffers);
|
||||
ngDoCheck(): void;
|
||||
ngOnChanges(changes: SimpleChanges): void;
|
||||
}
|
||||
|
||||
export declare class NgForOfContext<T> {
|
||||
|
Reference in New Issue
Block a user