
Introduces the new `ANALYZE_FOR_PRECOMPILE` token. This token can be used to create a virtual provider that will populate the `precompile` fields of components and app modules based on its `useValue`. All components that are referenced in the `useValue` value (either directly or in a nested array or map) will be added to the `precompile` property. closes #9874 related to #9726
28 lines
829 B
TypeScript
28 lines
829 B
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 {AppModule, ApplicationRef} from '@angular/core';
|
|
import {BrowserModule} from '@angular/platform-browser';
|
|
|
|
import {AnimateCmp} from './animate';
|
|
import {BasicComp} from './basic';
|
|
import {CompWithAnalyzePrecompileProvider, CompWithPrecompile} from './precompile';
|
|
import {ProjectingComp} from './projection';
|
|
import {CompWithChildQuery} from './queries';
|
|
|
|
@AppModule({
|
|
modules: [BrowserModule],
|
|
precompile: [
|
|
AnimateCmp, BasicComp, CompWithPrecompile, CompWithAnalyzePrecompileProvider, ProjectingComp,
|
|
CompWithChildQuery
|
|
]
|
|
})
|
|
export class MainModule {
|
|
constructor(public appRef: ApplicationRef) {}
|
|
}
|