angular/packages/compiler-cli/integrationtest/src/bootstrap.ts
Andrew Kushnir a6d5fe202c feat(core): alias createNgModuleRef as createNgModule (#46789)
This commit adds the `createNgModuleRef` function alias to the public API. The alias is called `createNgModule`. The `createNgModule` name is more consistent with the rest of the API surface, where functions that return `*Ref`s don't include the `Ref` into the function name, for example: `createPlatform`, `ViewContainerRef.createComponent`, etc.

DEPRECATED:

The `createNgModuleRef` is deprecated in favor of newly added `createNgModule` one.

PR Close #46789
2022-07-12 16:11:41 +00:00

15 lines
421 B
TypeScript

/**
* @license
* Copyright Google LLC 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 {createNgModule} from '@angular/core';
import {BasicComp} from './basic';
import {MainModule} from './module';
const ngModuleRef = createNgModule(MainModule);
ngModuleRef.instance.appRef.bootstrap(BasicComp);