PlatformRef • Angular

Creates an instance of an @NgModule for the given platform.

Creates an instance of an @NgModule for a given platform.

Usage notes

Simple Example

@NgModule({  imports: [BrowserModule]})class MyModule {}let moduleRef = platformBrowser().bootstrapModule(MyModule);

Registers a listener to be called when the platform is destroyed.

@returnsvoid

Retrieves the platform Injector, which is the parent injector for every Angular application on the page and provides singleton providers.

Destroys the current Angular platform and all Angular applications on the page. Destroys all modules and listeners registered with the platform.

@returnsvoid

Indicates whether this instance was destroyed.