
Note, this affects the underlying class and should not affect usage. DEPRECATION: - the `NgFor` class is now deprecated. Use `NgForOf<T>` instead. IMPORTANT: Only the `NgFor` class is deprecated, not the `ngFor` directive. The `*ngFor` and related directives are unaffected by this change as references to the `NgFor` class generated from templates will be automatically converted to references to `NgForOf<T>` without requiring any template modifications. - `TrackByFn` is now deprecated. Use `TrackByFunction<T>` instead. Migration: - Replace direct references to the `NgFor` class to `NgForOf<any>`. - Replace references to `TrackByFn` to `TrackByFunction<any>`. BREAKING CHANGE: A definition of `Iterable<T>` is now required to correctly compile Angular applications. Support for `Iterable<T>` is not required at runtime but a type definition `Iterable<T>` must be available. `NgFor`, and now `NgForOf<T>`, already supports `Iterable<T>` at runtime. With this change the type definition is updated to reflect this support. Migration: - add "es2015.iterable.ts" to your tsconfig.json "libs" fields. Part of #12398 PR Close #14104
38 lines
1.1 KiB
TypeScript
38 lines
1.1 KiB
TypeScript
/**
|
|
* @license
|
|
* Copyright Google Inc. All Rights Reserved.
|
|
*
|
|
* Use of this source code is governed by an MIT-style license that can be
|
|
* found in the LICENSE file at https://angular.io/license
|
|
*/
|
|
|
|
import {NgModule} from '@angular/core';
|
|
|
|
import {COMMON_DEPRECATED_DIRECTIVES, COMMON_DIRECTIVES} from './directives/index';
|
|
import {NgLocaleLocalization, NgLocalization} from './localization';
|
|
import {COMMON_PIPES} from './pipes/index';
|
|
|
|
|
|
// Note: This does not contain the location providers,
|
|
// as they need some platform specific implementations to work.
|
|
/**
|
|
* The module that includes all the basic Angular directives like {@link NgIf}, {@link NgForOf}, ...
|
|
*
|
|
* @stable
|
|
*/
|
|
@NgModule({
|
|
declarations: [COMMON_DIRECTIVES, COMMON_PIPES],
|
|
exports: [COMMON_DIRECTIVES, COMMON_PIPES],
|
|
providers: [
|
|
{provide: NgLocalization, useClass: NgLocaleLocalization},
|
|
],
|
|
})
|
|
export class CommonModule {
|
|
}
|
|
|
|
/**
|
|
* A module to contain deprecated directives.
|
|
*/
|
|
@NgModule({declarations: [COMMON_DEPRECATED_DIRECTIVES], exports: [COMMON_DEPRECATED_DIRECTIVES]})
|
|
export class CommonDeprecatedModule {
|
|
} |