mirror of
https://github.com/angular/angular
synced 2026-05-24 09:28:37 +00:00
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
15 lines
421 B
TypeScript
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);
|