This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| export class AppModule { | |
| constructor(injector: Injector) { | |
| injector.constructor.name === 'NgModuleRef_'; // true | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function evalExpression( | |
| sourceUrl: string, | |
| ctx: EmitterVisitorContext, | |
| vars: { [key: string]: any }, | |
| createSourceMap: boolean | |
| ): any { | |
| let fnBody = `${ctx.toSource()}\n//# sourceURL=${sourceUrl}`; | |
| const fnArgNames: string[] = []; | |
| const fnArgValues: any[] = []; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @Component({ | |
| selector: 'app-root', | |
| templateUrl: './app.component.html', | |
| changeDetection: ChangeDetectionStrategy.OnPush | |
| }) | |
| export class AppComponent {} | |
| // объект со всей информацией о компоненте перед линковкой | |
| const compileDirectiveMetadata: CompileDirectiveMetadata = { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| return Promise.resolve(this._compileModuleAndComponents(moduleType, false)); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @Injectable() | |
| class PlatformRef { | |
| private _modules: NgModuleRef<any>[] = []; | |
| private _destroyListeners: Function[] = []; | |
| private _destroyed: boolean = false; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function createPlatform(injector: Injector): PlatformRef { | |
| if ( | |
| _platform && | |
| !_platform.destroyed && | |
| !_platform.injector.get(ALLOW_MULTIPLE_PLATFORMS, false) | |
| ) { | |
| throw new Error( | |
| 'There can be only one platform. Destroy the previous one to create a new one.' | |
| ); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const INTERNAL_BROWSER_DYNAMIC_PLATFORM_PROVIDERS = [ | |
| INTERNAL_BROWSER_PLATFORM_PROVIDERS, | |
| { | |
| provide: COMPILER_OPTIONS, | |
| useValue: { | |
| providers: [ | |
| { | |
| provide: ResourceLoader, | |
| useClass: ResourceLoaderImpl, | |
| deps: [] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const platformBrowserDynamic = createPlatformFactory(platformCoreDynamic, 'browserDynamic', INTERNAL_BROWSER_DYNAMIC_PLATFORM_PROVIDERS); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class AppComponent { | |
| public static __annotations__ = [ | |
| { | |
| changeDetection: 0, | |
| selector: 'app-root', | |
| template: 'шаблон' | |
| } | |
| ]; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class AppComponent { | |
| public static __prop__metadata__ = { | |
| documentClick: { | |
| eventName: 'document:click', | |
| args: undefined | |
| } | |
| }; | |
| } |