angular/packages/core/src/r3_symbols.ts
Alex Rickabaugh 33fd7e0784 fix(ivy): export NgModuleFactory via r3_symbols for core factories (#25392)
When @angular/core is compiled by ngtsc, a factory file is generated
for ApplicationModule, that is currently invalid because r3_symbols
does not export NgModuleFactory. This change fixes that issue and
ensures the generated ngfactory file for @angular/core is valid.

PR Close #25392
2018-08-09 09:58:13 -07:00

33 lines
1.3 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
*/
/*
* This file exists to support compilation of @angular/core in Ivy mode.
*
* When the Angular compiler processes a compilation unit, it normally writes imports to
* @angular/core. When compiling the core package itself this strategy isn't usable. Instead, the
* compiler writes imports to this file.
*
* Only a subset of such imports are supported - core is not allowed to declare components or pipes.
* A check in ngtsc's translator.ts validates this condition.
*
* The below symbols are used for @Injectable and @NgModule compilation.
*/
export {InjectableDef as ɵInjectableDef, InjectorDef as ɵInjectorDef, defineInjectable, defineInjector} from './di/defs';
export {inject} from './di/injector';
export {NgModuleDef as ɵNgModuleDef} from './metadata/ng_module';
export {defineNgModule as ɵdefineNgModule} from './render3/definition';
export {NgModuleFactory as ɵNgModuleFactory} from './render3/ng_module_ref';
/**
* The existence of this constant (in this particular file) informs the Angular compiler that the
* current program is actually @angular/core, which needs to be compiled specially.
*/
export const ITS_JUST_ANGULAR = true;