refactor(common): remove deprecated NgFor
(#18758)
BREAKING CHANGE: `NgFor` has been removed as it was deprecated since v4. Use `NgForOf` instead. This does not impact the use of`*ngFor` in your templates. PR Close #18758
This commit is contained in:

committed by
Miško Hevery

parent
7ce9e06dab
commit
ec56760c9b
@ -10,7 +10,7 @@ import {Provider} from '@angular/core';
|
||||
|
||||
import {NgClass} from './ng_class';
|
||||
import {NgComponentOutlet} from './ng_component_outlet';
|
||||
import {NgFor, NgForOf, NgForOfContext} from './ng_for_of';
|
||||
import {NgForOf, NgForOfContext} from './ng_for_of';
|
||||
import {NgIf, NgIfContext} from './ng_if';
|
||||
import {NgPlural, NgPluralCase} from './ng_plural';
|
||||
import {NgStyle} from './ng_style';
|
||||
@ -20,7 +20,6 @@ import {NgTemplateOutlet} from './ng_template_outlet';
|
||||
export {
|
||||
NgClass,
|
||||
NgComponentOutlet,
|
||||
NgFor,
|
||||
NgForOf,
|
||||
NgForOfContext,
|
||||
NgIf,
|
||||
@ -53,8 +52,3 @@ export const COMMON_DIRECTIVES: Provider[] = [
|
||||
NgPlural,
|
||||
NgPluralCase,
|
||||
];
|
||||
|
||||
/**
|
||||
* A collection of deprecated directives that are no longer part of the core module.
|
||||
*/
|
||||
export const COMMON_DEPRECATED_DIRECTIVES: Provider[] = [NgFor];
|
||||
|
@ -199,16 +199,6 @@ class RecordViewTuple<T> {
|
||||
constructor(public record: any, public view: EmbeddedViewRef<NgForOfContext<T>>) {}
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated from v4.0.0 - Use NgForOf<any> instead.
|
||||
*/
|
||||
export type NgFor = NgForOf<any>;
|
||||
|
||||
/**
|
||||
* @deprecated from v4.0.0 - Use NgForOf instead.
|
||||
*/
|
||||
export const NgFor = NgForOf;
|
||||
|
||||
export function getTypeNameForDebugging(type: any): string {
|
||||
return type['name'] || typeof type;
|
||||
}
|
||||
|
Reference in New Issue
Block a user