Revert "refactor(core): tree-shake application_module providers (#23477)"

This reverts commit eb031c6ff1.

The change is breaking targets in g3 see cl/194336387.
This commit is contained in:
Igor Minar
2018-04-26 14:08:13 -07:00
parent 1a44a0b4a8
commit 5b96078624
8 changed files with 20 additions and 61 deletions

View File

@ -6,8 +6,7 @@
* found in the LICENSE file at https://angular.io/license
*/
import {Injectable, InjectionToken, StaticProvider, inject} from '../di';
import {defineInjectable} from '../di/defs';
import {Injectable, InjectionToken, StaticProvider} from '../di';
import {MissingTranslationStrategy} from '../i18n/tokens';
import {ViewEncapsulation} from '../metadata';
import {Type} from '../type';
@ -16,7 +15,6 @@ import {ComponentFactory} from './component_factory';
import {NgModuleFactory} from './ng_module_factory';
/**
* Combination of NgModuleFactory and ComponentFactorys.
*
@ -43,17 +41,8 @@ function _throwError() {
* of components.
*
*/
@Injectable()
export class Compiler {
// `ngInjectableDef` is required in core-level code because it sits behind
// the injector and any code the loads it inside may run into a dependency
// loop (because Injectable is also in core. Do not use the code below
// (use @Injectable({ providedIn, factory })) instead...
/**
* @internal
* @nocollapse
*/
static ngInjectableDef = defineInjectable({providedIn: 'root', factory: () => new Compiler()});
/**
* Compiles the given NgModule and all of its components. All templates of the components listed
* in `entryComponents` have to be inlined.