mirror of
https://github.com/angular/angular.git
synced 2026-09-14 13:54:52 +08:00
refactor(common): expose NgImage directive via a private API (#47082)
This commit exports experimental `NgImage` directive via a private API of the `@angular/common` package, so that it can be used acorss other Angular packages for testing purposes. PR Close #47082
This commit is contained in:
committed by
Pawel Kozlowski
parent
86e77a5d55
commit
0d330d0bcd
@@ -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';
|
||||
|
||||
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user