diff --git a/packages/common/src/common.ts b/packages/common/src/common.ts index c8579fb932a..586972414e6 100644 --- a/packages/common/src/common.ts +++ b/packages/common/src/common.ts @@ -27,3 +27,4 @@ export {PLATFORM_BROWSER_ID as ɵPLATFORM_BROWSER_ID, PLATFORM_SERVER_ID as ɵPL export {VERSION} from './version'; export {ViewportScroller, NullViewportScroller as ɵNullViewportScroller} from './viewport_scroller'; export {XhrFactory} from './xhr'; +export {NgImageModule as ɵNgImageModule, NgImage as ɵNgImage, IMAGE_LOADER as ɵIMAGE_LOADER} from './directives/ng_image'; diff --git a/packages/common/src/directives/ng_image.ts b/packages/common/src/directives/ng_image.ts index 8edaa6642b4..df2b2de2179 100644 --- a/packages/common/src/directives/ng_image.ts +++ b/packages/common/src/directives/ng_image.ts @@ -6,7 +6,7 @@ * found in the LICENSE file at https://angular.io/license */ -import {Directive, Inject, InjectionToken, Input, SimpleChanges, ɵRuntimeError as RuntimeError} from '@angular/core'; +import {Directive, Inject, InjectionToken, Input, NgModule, SimpleChanges, ɵRuntimeError as RuntimeError} from '@angular/core'; import {RuntimeErrorCode} from '../errors'; @@ -132,6 +132,17 @@ export class NgImage { } } +/** + * Temporary NgModule that exports the `NgImage` directive. + * The module should not be needed once the `standalone` flag is supported as a public API. + */ +@NgModule({ + declarations: [NgImage], + exports: [NgImage], +}) +export class NgImageModule { +} + /***** Helpers *****/ // Convert input value to integer.